tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: netbsd-5: another problem, news/leafnode + ioctl(SIOCGIFCONF)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Christos Zoulas wrote:
> On Mar 21, 3:58pm, vle%gmx.net@localhost (Aleksey Cheusov) wrote:
> -- Subject: Re: netbsd-5: another problem, news/leafnode + ioctl(SIOCGIFCONF)
>
> |
> | >>leafnode-1.11.3nb1
> |
> | > change it to use getifaddrs().
> |
> | That is SIOCGIFCONF ioctl (or something else) is broken in netbsd-5
> | and leafnode needs to be patched. Right?
> | Is this change documented anywhere?
>
> It is behavioral difference. The old ioctl could not handle sockaddr_storage.
It needs to be changed to something like this - taken from dhcpcd, net.c
struct ifreq *ifr;
#ifndef __linux__
if (ifr->ifr_addr.sa_len > sizeof(ifr->ifr_ifru))
p += offsetof(struct ifreq, ifr_ifru + ifr->ifr_addr.sa_len;
else
#endif
p += sizeof(*ifr);
If the code is autotooled, you should change the #ifndef __linux__ to
something like #ifdef HAVE_SA_LEN and ensure that autotools works out of
the ifaddr structure has the sa_len property.
Thanks
Roy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQEcBAEBAgAGBQJJxq5uAAoJEFl/l+qa1FVJZ2EIAK/8lPai3tkc7iCMCAu64y/V
ql2BxDW7EAW888APfCHPV+cAkRKYv1ADVcgy+n8RroWDKUa9ajwBJKzvF1IhJiSI
5fUtTSIeVFSJIWiH9C3TsVcHOj0dOA6Unt7tyK3O058+I9b9jYYN9jqV69IjzmM6
6nyFQTmuciaSWi6UGw4yZgEtoBYGVOU/sUHLwM7sVcB4YhQCdXWjFAKw4LryRoLn
HEvZUf0xIgrN8z6/4wHLkEgTMhfhnFg/jmSeje+KB4W5O2an8LWhhtaNOk/YBORP
EdYQL08E/v7M1di+n6sSDwkseyaUeocAKkK4DG+sDnPckfHdDio4GRmSoGz0JtI=
=Vhp4
-----END PGP SIGNATURE-----
Home |
Main Index |
Thread Index |
Old Index