Subject: Re: dhcpd
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Greg Troxel <gdt@ir.bbn.com>
List: tech-net
Date: 09/13/2007 08:01:30
I have committed a fix to dhcpd. Unfortunately it's not possible to
change the kernel to make all the previous users of SIOCGIFCONF work
correctly given the change to sockaddr_storage in struct ifreq, and I
chose the sane interpretation.
From: Greg Troxel <gdt@netbsd.org>
Subject: CVS commit: src/dist/dhcp/common
To: source-changes@NetBSD.org
Date: Thu, 13 Sep 2007 11:56:42 +0000 (UTC)
Reply-To: gdt@netbsd.org
Module Name: src
Committed By: gdt
Date: Thu Sep 13 11:56:41 UTC 2007
Modified Files:
src/dist/dhcp/common: discover.c
Log Message:
Follow NetBSD's interpretation of the interface to SIOCGIFCONF: the
next ifreq is sizeof(struct ifreq) after the current one unless the
sockaddr is bigger than the union in ifreq that holds it.
In the original 4.4BSD code, this interpretation results in the same
behavior as the "is the sockaddr bigger than struct sockaddr", because
sizeof(struct sockaddr) and sizeof(ifc->ifr_ifru) are the same.
Add comments pointing out problems in the 'need bigger buffer' code,
and copying excessive amounts of data.
To generate a diff of this commit:
cvs rdiff -r1.9 -r1.10 src/dist/dhcp/common/discover.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.