Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Mar 2005 09:29:17 -0500 (EST)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        "P.ArulChandran" <parcn@yahoo.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: IP over FireWire and Mac OSX 
Message-ID:  <16964.8253.471835.634579@grasshopper.cs.duke.edu>
In-Reply-To: <20050325025017.21991.qmail@web41106.mail.yahoo.com>
References:  <20050325025017.21991.qmail@web41106.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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