Re: [PATCH] fix up bogus length check in output.c]|
Lennert Buytenhek <buytenh,AT,gnu,DOT,org>|
Thu, 1 Nov 2001 22:41:12 +0100|
On Thu, Nov 01, 2001 at 11:22:48PM +0200, Pekka Savola wrote:
> > > > (come to think of it, the check could be made more precise by writing
> > > > like "if ((length < 60 && ilen > 60) || (length >= 60 &&
> > >
> > > The minimum total length of an Ethernet frame is 64 bytes.
> > Which is 60 bytes plus the hardware-generated 4-byte Frame Check
> > Sequence, surely?
> Yes, the FCS is 4 bytes, and included in the 64 bytes. Whether that shows
> in the data structure I don't know.
No, skb->length does not include the FCS (nowadays every device hides
this detail from the implementation, except the rtl8139 I believe (which
caused problems with bridging in combination with earlier drivers for
this card)), so the check should be safe.