From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 25 14:29:25 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AADAF16A4CE for ; Fri, 25 Mar 2005 14:29:25 +0000 (GMT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 38F1043D4C for ; Fri, 25 Mar 2005 14:29:23 +0000 (GMT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.13.1/8.13.1) with ESMTP id j2PETMNf004594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 25 Mar 2005 09:29:22 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id j2PETHFV066938; Fri, 25 Mar 2005 09:29:17 -0500 (EST) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="TCTQiORpOj" Content-Transfer-Encoding: 7bit Message-ID: <16964.8253.471835.634579@grasshopper.cs.duke.edu> Date: Fri, 25 Mar 2005 09:29:17 -0500 (EST) To: "P.ArulChandran" In-Reply-To: <20050325025017.21991.qmail@web41106.mail.yahoo.com> References: <20050325025017.21991.qmail@web41106.mail.yahoo.com> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid cc: freebsd-hackers@freebsd.org Subject: Re: IP over FireWire and Mac OSX X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2005 14:29:25 -0000 --TCTQiORpOj Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit P.ArulChandran writes: > By analyzing the packets from FreeBSD in firebug log, I could see that > unfragmented packets are sent as fragmented packets, with inappropriate > values in the packet header. Even if the packets are fragmented, the > 'lf' field is not set correctly. To comply with Section 4.2 of RFC > 2734, FreeBSD should set 'lf' to correct values to indicate, whether > the packet is fragmented or unfragmented. I just read the RFC and it looks like we're both at fault. According to the RFC: A RESERVED object has no defined meaning and SHALL be zeroed by its originator or, upon development of a future standard, set to a value specified by such a standard. The recipient of a RESERVED object SHALL NOT check its value. Emperically it would seem that FreeBSD is not zeroing the reserved fields like it should. Further, since zeroing the reserved fields fixes interoperability, it would seem that MacOSX is not ignoring them like it should. It is fun when different implementations collide in the field ;) > In any case, Mac OS X should add more saftey checks to prevent panics > from corrupted packets. Yes, and we should zero the reserved fields. Doing so seems to fix interoperability with unpatched versions of MacOSX. See the attached patch. Thanks for letting me know what was going on and making this so easy to fix.. Drew --TCTQiORpOj Content-Type: application/octet-stream Content-Description: full rfc2734 compliance Content-Disposition: attachment; filename="fwip.diff" Content-Transfer-Encoding: base64 SW5kZXg6IG5ldC9pZl9md3N1YnIuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvaG9tZS9u Y3ZzL3NyYy9zeXMvbmV0L2lmX2Z3c3Vici5jLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjUu Mi4xCmRpZmYgLXUgLXIxLjUuMi4xIGlmX2Z3c3Vici5jCi0tLSBuZXQvaWZfZndzdWJyLmMJ MjQgQXVnIDIwMDQgMTQ6MTk6MzMgLTAwMDAJMS41LjIuMQorKysgbmV0L2lmX2Z3c3Vici5j CTI1IE1hciAyMDA1IDE0OjIyOjM2IC0wMDAwCkBAIC0yMzgsNiArMjM4LDcgQEAKIAkJZW5j ID0gbXRvZChtLCB1bmlvbiBmd19lbmNhcCAqKTsKIAkJZW5jLT51bmZyYWcuZXRoZXJfdHlw ZS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