Subject: kern/8194: NE2000 (and other) ethernet driver uses incorrect minimum packet length (upsets COM21 cable modems)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <don@daedalus.co.nz>
List: netbsd-bugs
Date: 08/11/1999 23:35:43
>Number: 8194
>Category: kern
>Synopsis: NE2000 (and other) ethernet driver uses incorrect minimum packet length (upsets COM21 cable modems)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 11 23:35:00 1999
>Last-Modified:
>Originator: Don Stokes
>Organization:
Daedalus Consulting
>Release: 1.3.2
>Environment:
NetBSD gw.daedalus.co.nz 1.3.2 NetBSD 1.3.2 (GATEWAY) #1: Thu Aug 12 17:34:55 NZST 1999 don@toyunix.zl2tnm.gen.nz:/usr/src/NetBSD-1.3.2/sys/arch/i386/compile/GATEWAY i386
>Description:
In dp8390.c, ETHER_MIN_LEN is #defined as 64. It should be 60. (64
includes the CRC, and that's outside the data frame and should not
be included.)
I believe the same bug lies in other drivers but haven't investigated
further. (Hey, I fixed *my* problem! 8-)
>How-To-Repeat:
Plug a NetBSD box with NE cards into a COM21 cable modem with ARP
filtering turned on! The 64 byte ARP (inc. MAC header) packets were
simply dropped on the floor, while 60 byte ones were fine. Ouch.
(The problem is also being reported to COM21, as the packets are
perfectly valid ARP packets, just have slightly more junk than
usual hanging off the end, and therefore shouldn't be dropped on
the floor.)
Or run tcpdump (from another box) and send some minimal length packets,
eg ping -s 1 or ARP packets, note how the data portion of the packets
send by the BSD box are 50 bytes long (64 minus the 14 bytes of MAC
header) whereas packets from other systems are 46 bytes long.
>Fix:
In /sys/dev/ic/dp8390.c change:
#define ETHER_MIN_LEN 64
to
#define ETHER_MIN_LEN 60
and recompile the kernel.
I note that other drivers have a similar #define, and may therefore
suffer the same problem.
>Audit-Trail:
>Unformatted: