From owner-cvs-all Wed Feb 10 10:46:18 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA02329 for cvs-all-outgoing; Wed, 10 Feb 1999 10:46:18 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from bubba.whistle.com (s205m7.whistle.com [207.76.205.7]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA02324 for ; Wed, 10 Feb 1999 10:46:17 -0800 (PST) (envelope-from archie@whistle.com) Received: (from archie@localhost) by bubba.whistle.com (8.9.2/8.9.2) id KAA63779 for cvs-committers@freebsd.org; Wed, 10 Feb 1999 10:46:00 -0800 (PST) From: Archie Cobbs Message-Id: <199902101846.KAA63779@bubba.whistle.com> Subject: Re: isc-dhcpd To: cvs-committers@FreeBSD.ORG Date: Wed, 10 Feb 1999 10:46:00 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk This is from an email I sent to Ted Lemon regarding the ISC dhcp code.. I think there is a bug we need to account for. Could some network guru confirm this? By the way, I've seen this bug actually happen and cause problems. For some reason a tunnel interface came up with sa_len = 0 somehow, I guess because it has an empty "link layer" addresss. Thanks, -Archie > Regarding these lines in isc-dhcp/common/dispatch.c: > > #ifdef HAVE_SA_LEN > if (ifp -> ifr_addr.sa_len) > i += (sizeof ifp -> ifr_name) + ifp -> ifr_addr.sa_len; > else > #endif > i += sizeof *ifp; > > I believe the correct algorithm -- at least, for FreeBSD -- is: > > #ifdef HAVE_SA_LEN > i += (sizeof ifp -> ifr_name) + > ((ifp -> ifr_addr.sa_len < sizeof ifp -> ifr_addr) ? > sizeof ifp -> ifr_addr : ifp -> ifr_addr.sa_len); > #else > i += sizeof *ifp; > #endif ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message