Subject: Is this a backward compatability failure in SIOCGIFCONF?
To: None <current-users@netbsd.org>
From: Alan Barrett <apb@cequrux.com>
List: current-users
Date: 10/17/2007 11:02:27
A slightly old dhclient (built for NetBSD-4.99.30) doesn't work with
a current kernel (NetBSD-4.99.33/i386).  The following error message
appears in syslog:

	Can't get interface flags for I@`:pL: Device not configured

This message is printed in src/dist/dhcp/common/discover.c,
when it tries to use ioctl(,SIOCGIFFLAGS,) on an interface name that
was obtained from ioctl(,SIOCGIFCONF,).

The failing dhclient was built with revision 1.9 of
src/dist/dhcp/common/discover.c, and I see the change that was made in
revision 1.10 of that file (chanmging the way dhcp/dhclient interprets
the result from SIOCGIFCONF), and the change that was made in revision
1.200 of src/sys/net/if.c (changing the way the kernel implements
SIOCGIFCONF).

My question is: Is the change in revision 1.200 of src/sys/net/if.c a
change to a kernel interface (in which case I'd argue that there should
be binary backward compatibility for old applications), or is it a
kernel bug fix (in which case I'd argue that it's fine to break old
applications that had been relying on the previous buggy behaviour).

--apb (Alan Barrett)