From owner-freebsd-hackers Sun May 14 02:53:51 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id CAA02285 for hackers-outgoing; Sun, 14 May 1995 02:53:51 -0700 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id CAA02279 for ; Sun, 14 May 1995 02:53:46 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.11/8.6.9) id CAA03247; Sun, 14 May 1995 02:52:35 -0700 From: "Rodney W. Grimes" Message-Id: <199505140952.CAA03247@gndrsh.aac.dev.com> Subject: Re: Questions/comments on ed driver To: davidg@Root.COM Date: Sun, 14 May 1995 02:52:34 -0700 (PDT) Cc: jhay@mikom.csir.co.za, seki@sysrap.cs.fujitsu.co.jp, FreeBSD-Hackers@FreeBSD.org In-Reply-To: <199505140942.CAA00786@corbin.Root.COM> from "David Greenman" at May 14, 95 02:42:52 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2149 Sender: hackers-owner@FreeBSD.org Precedence: bulk > > >> >I examined the ed driver (of 950412 SNAP.) I found some (essentially > >> >2) strangeness in it. I'm not sure I found bugs or just > >> >misunderstood. > >> > > >> >It is appreciated if you hackers give me comments. > >> > > >> >1. If_ed.c defines ETHER_MAX be 1518 and ETHER_MIN 64. The length > >> >includes 4 bytes for CRC. However, it looks like the program compares > >> >them against packet lengths *without* CRC. > >> > >> Actually, the other 4 bytes is for the DS8390 packet header. The comparison > >> is correct. > >> > >I'm not sure that ETHER_MIN is correct. During December I hacked the NETNS code > >to do IPX, so that I could use a FreeBSD box to do IPX routing. I worked fine > >with DOS machines and packet drivers. When I used a client with the Novell ODI > >drivers it did not work until I changed ETHER_MIN to 60. Now I know that the > >ODI driver probably have a bug because they shouldn't care what the size of > >the packet is, but that led me to believe that the minimum packet size was too > >big. (64 bytes plus 4 for the CRC) > > > >One of my standard patches now is to change ETHER_MIN_LEN to 60. > > Gack. I think you're right. ETHER_MIN_LEN is used to round up small [IP] > packets to the minimum size that ethernet supports. This is actually 60 > bytes of data. At one time this constant was also used in other places (and in > those places its use was correct). ETHER_MAX_LEN should probably be changed to > 1514 and then +4 added to it when comparing to "len" (which is header+data). > I'll check my documentation and investigate further. If the change to 60 is > indeed correct, I'll commit it to CVS tonight. To maintain full compatibilty with all old ethernet systems we should never generate a packet on the wire shorter than 64 bytes (the new standard) but should accept packets of 60 bytes. This was changed 8 years ago or something like that and I just find it amazing that people still have not fixed there broken code :-(. -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Custom computers for FreeBSD