[1395] in linux-net channel archive

home help back first fref pref prev next nref lref last post

Re: Spontaneous reboots caused by bogons

daemon@ATHENA.MIT.EDU (Paul Gortmaker)
Fri Nov 17 15:52:45 1995

From: Paul Gortmaker <gpg109@rsphy1.anu.edu.au>
To: ftom@netcom.com (Tom May)
Date: Thu, 16 Nov 1995 23:21:12 +1100 (EST)
Cc: linux-net@vger.rutgers.edu
In-Reply-To: <199511160717.XAA19168@netcom5.netcom.com> from "Tom May" at Nov 15, 95 11:17:58 pm

Tom May: (ftom@netcom.com Thu Nov 16 18:19:37 1995)

> Shouldn't bogons be dropped before eth_copy_and_sum() is ever called?
> Otherwise it's just copying and summing useless garbage and wasting time.

The 8390 drivers only check to see if the total packet has a valid
length (i.e. >59 and <1519) before fobbing it off to the next layer.

I was toying with the idea of "if (ip_length <8) return;" but this
is not really correct. Consider someone who writes a packet-sniffer
application that is interested in Rx'ing these bogons to diagnose
net problems. They would (silently) only get 34 bytes of the total
packet if we did that. Too much like MicroSloth behaviour for me...

Besides, the whole issue is moot, as a decent net should have less
than 0.00001% bogon IP packets anyway. (Which makes me wonder about the 
nets that the people who reported the problem are hooked up to...)

> P.S. Thanks for finding this.  The sizeof() forcing the compare to
> unsigned is pretty subtle.  Some days I prefer the clarity of asm.

Yeah, gcc "asm" statements are usually as clear as mud.   :-)

Paul.

home help back first fref pref prev next nref lref last post