Date: Wed, 10 Feb 1999 10:46:00 -0800 (PST) From: Archie Cobbs <archie@whistle.com> To: cvs-committers@FreeBSD.ORG Subject: Re: isc-dhcpd Message-ID: <199902101846.KAA63779@bubba.whistle.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902101846.KAA63779>