From owner-freebsd-current@FreeBSD.ORG Sun May 16 12:13:47 2004 Return-Path: <owner-freebsd-current@FreeBSD.ORG> Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8523916A4CE; Sun, 16 May 2004 12:13:47 -0700 (PDT) Received: from herring.rabson.org (mailgate.nlsystems.com [80.177.232.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CAA843D2F; Sun, 16 May 2004 12:13:46 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from herring.rabson.org (herring.rabson.org [10.0.0.2]) by herring.rabson.org (8.12.11/8.12.11) with ESMTP id i4GJDY6W001294; Sun, 16 May 2004 20:13:34 +0100 (BST) (envelope-from dfr@nlsystems.com) From: Doug Rabson <dfr@nlsystems.com> To: freebsd-current@freebsd.org Date: Sun, 16 May 2004 20:13:33 +0100 User-Agent: KMail/1.6.1 References: <20040425094940.A50968@xorpc.icir.org> In-Reply-To: <20040425094940.A50968@xorpc.icir.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405162013.33894.dfr@nlsystems.com> X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on herring.rabson.org X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.65', clamav-milter version '0.60p' cc: Luigi Rizzo <rizzo@icir.org> cc: current@freebsd.org cc: net@freebsd.org Subject: Re: new arp code snapshot for review... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current <freebsd-current.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-current>, <mailto:freebsd-current-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current> List-Post: <mailto:freebsd-current@freebsd.org> List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-current>, <mailto:freebsd-current-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sun, 16 May 2004 19:13:47 -0000 On Sunday 25 April 2004 17:49, Luigi Rizzo wrote: > Here is a snapshot of the new arp code that i have been working on > lately, based a on Andre's ideas. (I say 'ARP' for brevity, what i > mean is the layer3-to-layer2 address translation code -- arp, aarp, > nd6 all fit in the category). Sorry for the delay but I've only just had reason to look at the arp code since I've recently been working on an implementation of rfc2734 IP over firewire. In your patch, you assume that the size of the link-level address is always six bytes. This assumption is not valid - from the looks of the existing arp code, people went to great lengths to avoid making this assumption throughout the networking code. For IP over firewire, the link-level address is sixteen bytes. Other link types have various sizes. You must use ifp->if_addrlen in the generic code to cope with this correctly.