Subject: Re: dhcpd
To: Hisashi T Fujinaka <htodd@twofifty.com>
From: Greg Troxel <gdt@ir.bbn.com>
List: current-users
Date: 09/12/2007 20:09:09
If anyone wants to try this change, I think it will fix dhcp, but I
haven't even compiled it.  (The code looks like it has more problems -
lending weight to the 'all users of SIOCGIFCONF shoudl be converted to
getifaddrs.)  The if being changed will never be taken in -current.

Index: dist/dhcp/common/discover.c
===================================================================
RCS file: /cvsroot/src/dist/dhcp/common/discover.c,v
retrieving revision 1.9
diff -u -p -r1.9 discover.c
--- dist/dhcp/common/discover.c	31 May 2007 02:58:10 -0000	1.9
+++ dist/dhcp/common/discover.c	13 Sep 2007 00:07:07 -0000
@@ -235,7 +235,7 @@ void discover_interfaces (state)
 
 		memcpy(&ifcpy, (caddr_t)ic.ifc_req + i, sizeof(struct ifreq));
 #ifdef HAVE_SA_LEN
-		if (ifp -> ifr_addr.sa_len > sizeof (struct sockaddr)) {
+		if (ifp -> ifr_addr.sa_len > sizeof (ifp.ifr_ifru)) {
 			if (sizeof(struct ifreq) + ifp->ifr_addr.sa_len >
 			    sizeof(ifcpy))
 				break;