From owner-freebsd-hackers Wed Sep 2 21:49:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA13721 for freebsd-hackers-outgoing; Wed, 2 Sep 1998 21:49:50 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id VAA13713 for ; Wed, 2 Sep 1998 21:49:48 -0700 (PDT) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id EAA11546; Thu, 3 Sep 1998 04:54:07 +0200 From: Luigi Rizzo Message-Id: <199809030254.EAA11546@labinfo.iet.unipi.it> Subject: Re: bcmp abuse in networking code ? To: tlambert@primenet.com (Terry Lambert) Date: Thu, 3 Sep 1998 04:54:07 +0200 (MET DST) Cc: hackers@FreeBSD.ORG In-Reply-To: <199809030048.RAA01032@usr07.primenet.com> from "Terry Lambert" at Sep 3, 98 00:47:57 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > In my revised bridge code i have the following macros > > #define ETH_MATCH(a,b) ( \ ... > > #define IS_ETHER_BROADCAST(a) ( \ ... > As you noted, alignment is one issue. > > Another issue is the use of arbitrary length addresses in the ARP code. > > See www.daemonnews.org, in the "under the hood" column, where they > talk about implementing precisely this for FDDI and AX.25 support Alignment apart, this time it seems to me that you are mentioning a few not relevant things. The macros above have a clear ETH in the name, they are not meant for some generic link layer of the future which i cannot foresee (and for ARCNET and AX25... can we talk about them when we have support for them ?) If i am not mistaken FDDI has 6-byte addresses so it is not an issue. And i don't understand how ipv6 code could change the ethernet MAC addresses... > in the NetBSD kernel. > > Assumptions about the entry length are bad (IMO), in that they break > future compatability. ok, right now the code uses something like !bcmp(a, b, ETHER_ADDR_LEN) in place of the above macros. i guess they fall into the same category... cheers luigi > > Consider the IPv6 code from WIDE and INRIA, and make sure this change > does not damage the ability to use IPv6 on FreeBSD (for one concrete > case of current, working code, for all you X.25-haters...). > > > Terry Lambert > terry@lambert.org > --- > Any opinions in this posting are my own and not those of my present > or previous employers. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message