Processed: Re: Bug#740509: ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address
Processing commands for cont...@bugs.debian.org: found 740509 glibc/2.19-11 Bug #740509 {Done: Aurelien Jarno aure...@debian.org} [glibc] ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address Bug #765882 {Done: Aurelien Jarno aure...@debian.org} [glibc] freebsd-net-tools: ifconfig ioctl siocaifaddr Ignoring request to alter found versions of bug #740509 to the same values previously set Ignoring request to alter found versions of bug #765882 to the same values previously set tags 740509 + patch Bug #740509 {Done: Aurelien Jarno aure...@debian.org} [glibc] ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address Bug #765882 {Done: Aurelien Jarno aure...@debian.org} [glibc] freebsd-net-tools: ifconfig ioctl siocaifaddr Ignoring request to alter tags of bug #740509 to the same tags previously set Ignoring request to alter tags of bug #765882 to the same tags previously set thanks Stopping processing here. Please contact me if you need assistance. -- 740509: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740509 765882: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765882 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#740509: ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address
found 740509 glibc/2.19-11 tags 740509 + patch thanks Hi, I'm sorry, I made a mistake testing this on kfreebsd-i386; I'd modified a header in the build tree and forgotten about it. As a result, the workaround was not effective on kfreebsd-i386 10.1. Some additional code is committed now to svn/glibc-bsd/trunk/glibc-ports as r5668. Please could you pull in that change in the next glibc upload. I've re-tested it on kfreebsd-i386, kfreebsd-amd64, for kernels 9.0 and 10.1. Thanks, Regards, -- Steven Chamberlain ste...@pyro.eu.org -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Processed: Re: Bug#740509: ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address
Processing commands for cont...@bugs.debian.org: found 740509 glibc/2.19-12 Bug #740509 {Done: Aurelien Jarno aure...@debian.org} [glibc] ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address Bug #765882 {Done: Aurelien Jarno aure...@debian.org} [glibc] freebsd-net-tools: ifconfig ioctl siocaifaddr Marked as found in versions glibc/2.19-12; no longer marked as fixed in versions glibc/2.19-12 and reopened. Marked as found in versions glibc/2.19-12; no longer marked as fixed in versions glibc/2.19-12 and reopened. thanks Stopping processing here. Please contact me if you need assistance. -- 740509: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740509 765882: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765882 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Processed: Re: Bug#740509: ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address
Processing commands for cont...@bugs.debian.org: reassign 740509 glibc Bug #740509 [freebsd-net-tools] ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address Bug #765882 [freebsd-net-tools] freebsd-net-tools: ifconfig ioctl siocaifaddr Bug reassigned from package 'freebsd-net-tools' to 'glibc'. Bug reassigned from package 'freebsd-net-tools' to 'glibc'. No longer marked as found in versions freebsd-utils/9.2+ds1-1 and freebsd-utils/10.0-3. No longer marked as found in versions freebsd-utils/9.2+ds1-1 and freebsd-utils/10.0-3. Ignoring request to alter fixed versions of bug #740509 to the same values previously set Ignoring request to alter fixed versions of bug #765882 to the same values previously set found 740509 glibc/2.19-11 Bug #740509 [glibc] ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address Bug #765882 [glibc] freebsd-net-tools: ifconfig ioctl siocaifaddr Marked as found in versions glibc/2.19-11. Marked as found in versions glibc/2.19-11. affects 740509 + freebsd-net-tools Bug #740509 [glibc] ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address Bug #765882 [glibc] freebsd-net-tools: ifconfig ioctl siocaifaddr Added indication that 740509 affects freebsd-net-tools Added indication that 765882 affects freebsd-net-tools tags 740509 + patch Bug #740509 [glibc] ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address Bug #765882 [glibc] freebsd-net-tools: ifconfig ioctl siocaifaddr Added tag(s) patch. Added tag(s) patch. thanks Stopping processing here. Please contact me if you need assistance. -- 740509: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740509 765882: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765882 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#740509: ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address
reassign 740509 glibc found 740509 glibc/2.19-11 affects 740509 + freebsd-net-tools tags 740509 + patch thanks Hi, On 21/10/14 03:00, Steven Chamberlain wrote: The attached patch uses rt_msghdr-ifm_msglen to guess the running kernel version and accordingly, find the right place for the struct sockaddr_dl. I expect it will still work for the i386-on-amd64 compat case also. It works! It passed glibc's testsuite when running on kfreebsd-i386 9.0 (like on the buildds), and has fixed ifconfig on kfreebsd-i386 10.1. I've also committed it to /svn/glibc-bsd/trunk/glibc-ports Please could we get this into the next glibc upload, in order to fix kfreebsd-i386 networking? It might be an idea to also bump the Build-Depends to kfreebsd-kernel-headers ( 10.1~) [kfreebsd-any] because otherwise, building against older k-k-h could produce a glibc that still has this bug when run on a 10.1 (sid/jessie) kernel. Thanks! Regards, -- Steven Chamberlain ste...@pyro.eu.org From: Steven Chamberlain ste...@pyro.eu.org Subject: getifaddrs: work around a kfreebsd 9.0 to 10.1 ABI break --- a/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ifaddrs.c 2014-10-21 01:19:18.0 + +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ifaddrs.c 2014-10-21 01:27:59.072736100 + @@ -147,7 +147,13 @@ if (ifm-ifm_addrs RTA_IFP) { idx = ifm-ifm_index; ++icnt; +/* XXX: smooth over a kfreebsd 9.0-10.1 ABI break: + sizeof(struct rt_msghdr) is correct for 10.1 kernel */ dl = (struct sockaddr_dl *)(void *)(ifm + 1); +if (rtm-rtm_msglen == 152) { + /* on kfreebsd-i386 9.0, struct rt_msghdr is 96 bytes */ + dl = (struct sockaddr_dl *)((char *)ifm + 96); +} dcnt += SA_RLEN((struct sockaddr *)(void*)dl) + ALIGNBYTES; #ifdef HAVE_IFM_DATA @@ -234,7 +240,13 @@ ifm = (struct if_msghdr *)(void *)rtm; if (ifm-ifm_addrs RTA_IFP) { idx = ifm-ifm_index; +/* XXX: smooth over a kfreebsd 9.0-10.1 ABI break: + sizeof(struct rt_msghdr) is correct for 10.1 kernel */ dl = (struct sockaddr_dl *)(void *)(ifm + 1); +if (rtm-rtm_msglen == 152) { + /* on kfreebsd-i386 9.0, struct rt_msghdr is 96 bytes */ + dl = (struct sockaddr_dl *)((char *)ifm + 96); +} cif = ift; ift-ifa_name = names; signature.asc Description: OpenPGP digital signature
Bug#740509: ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address
Hi! The attached patch is my best guess at how to fix this bug. I'm still testing it myself, but I'm sharing it now in case anyone else is able to build glibc on kfreebsd-i386 and also help test. (It can take many hours to build glibc). getifaddrs() uses a NET_RT_IFLIST sysctl to get back a struct rt_msghdr followed by a struct sockaddr_dl. From kfreebsd 9.0 - 10.1, the rt_msghdr seems to be 4 bytes larger on kfreebsd-i386 only (not on kfreebsd-amd64, probably because there was some padding for alignment). With the current build of glibc (based on outdated kfreebsd-kernel-headers), ifconfig fails to get a list of interface names on 10.1 kernels, but can still do that within a chroot on 9.0. If glibc is rebuilt against latest kfreebsd-kernel-headers ( 10.1~), I think it works on 10.1 kernels, but stops working on kfreebsd-i386 9.0. The buildds run kfreebsd 9.0, so I expect it would FTBFS when that happens. The attached patch uses rt_msghdr-ifm_msglen to guess the running kernel version and accordingly, find the right place for the struct sockaddr_dl. I expect it will still work for the i386-on-amd64 compat case also. Regards, -- Steven Chamberlain ste...@pyro.eu.org From: Steven Chamberlain ste...@pyro.eu.org Subject: getifaddrs: work around a kfreebsd 9.0 to 10.1 ABI break --- a/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ifaddrs.c 2014-10-21 01:19:18.0 + +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ifaddrs.c 2014-10-21 01:27:59.072736100 + @@ -147,7 +147,13 @@ if (ifm-ifm_addrs RTA_IFP) { idx = ifm-ifm_index; ++icnt; +/* XXX: smooth over a kfreebsd 9.0-10.1 ABI break: + sizeof(struct rt_msghdr) is correct for 10.1 kernel */ dl = (struct sockaddr_dl *)(void *)(ifm + 1); +if (rtm-rtm_msglen == 152) { + /* on kfreebsd-i386 9.0, struct rt_msghdr is 96 bytes */ + dl = (struct sockaddr_dl *)((char *)ifm + 96); +} dcnt += SA_RLEN((struct sockaddr *)(void*)dl) + ALIGNBYTES; #ifdef HAVE_IFM_DATA @@ -234,7 +240,13 @@ ifm = (struct if_msghdr *)(void *)rtm; if (ifm-ifm_addrs RTA_IFP) { idx = ifm-ifm_index; +/* XXX: smooth over a kfreebsd 9.0-10.1 ABI break: + sizeof(struct rt_msghdr) is correct for 10.1 kernel */ dl = (struct sockaddr_dl *)(void *)(ifm + 1); +if (rtm-rtm_msglen == 152) { + /* on kfreebsd-i386 9.0, struct rt_msghdr is 96 bytes */ + dl = (struct sockaddr_dl *)((char *)ifm + 96); +} cif = ift; ift-ifa_name = names; signature.asc Description: OpenPGP digital signature
Bug#740509: ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address
On 23:34, Steven Chamberlain wrote: A sysctl { CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0 } from kfreebsd-i386 userland on kfreebsd-amd64 9.0 or 10.0 kernel, never seems to fail with ENOMEM! Regardless of given buffer size: Have tried on upstream 32-bit kernel with 32-bit userland, and it doesn't have this issue. So it is probably a bug in the compat code only. GNU libc should perhaps start with an initial 1024-byte allocation anyway, since 512 bytes is no longer enough even for a machine with only one NIC. Regards, -- Steven Chamberlain ste...@pyro.eu.org -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#740509: ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address
reassign 740509 libc0.1 found 740509 glibc/2.19-11 tags 740509 + jessie sid affects 740509 freebsd-net-tools user debian-...@lists.debian.org usertags 740509 + kfreebsd thanks On 13:10, Robert Millan wrote: $ sudo ifconfig -a : flags=8802BROADCAST,SIMPLEX,MULTICAST ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address : flags=0 ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address : flags=0 ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address : flags=8008LOOPBACK,MULTICAST ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address I think this could be related to a workaround in glibc local-sysdeps.diff for kfreebsd: + /* FIXME: 'struct if_msghdr' contains a 'struct if_data' which in turns +contains 'unsigned long' values. Their size therefore depends on +the running kernel (32 or 64 bits). This should be fixed in the +compat layer of the kernel. Meanwhile just workaround the bug here/ */ +#if 0 + sdl = (struct sockaddr_dl *) (msg + 1); +#else + sdl = (struct sockaddr_dl *) (p + msg-ifm_msglen - sizeof(struct sockaddr_dl) - 2); +#endif whereas if_data was removed from the struct in the following commit, to fix the ABI break; that means the workaround should no longer be used? http://svnweb.freebsd.org/base/head/sys/net/if.h?r1=231504r2=231503pathrev=231504 Regards, -- Steven Chamberlain ste...@pyro.eu.org -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#740509: ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address
Actually that workaround referred to *if_msghdr* but recent changes have been to *ifa_msghdr*: https://alioth.debian.org/scm/viewvc.php/trunk/glibc-ports/kfreebsd/if_index.c?root=glibc-bsdr1=1716r2=2484 so the problem is not quite what I thought. I think I've been seeing two bugs at once. This history of this is: struct if_msghdr contains a (pointer to a) struct if_data (since forever) which will be either a 32- or 64-bit sized member depending on the architecture. ABI would thus be incompatible between a 32-bit userland and 64-bit kernel. Building glibc in a kfreebsd-i386 sid chroot, on a kfreebsd-amd64 9.0 kernel, fails test_ifindex due to the above issue. Building glibc in a kfreebsd-i386 sid chroot, on a kfreebsd-i386 9.0 kernel like the Debian buildds have, is fine. But then userland tools like ifconfig don't work properly on any 10.x kernel. Building glibc in a kfreebsd-amd64 sid chroot, on kfreebsd-amd64 9.0 or 10.0 kernels is fine, and userland tools work fine on whichever kernel. Making this particularly awkward, however we fix this for kfreebsd-i386, it probably still needs to work on a 9.0 (wheezy) kernel because the buildds must run that until jessie is released. Regards, -- Steven Chamberlain ste...@pyro.eu.org -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#740509: ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address
On 13:10, Robert Millan wrote: $ sudo ifconfig -a : flags=8802BROADCAST,SIMPLEX,MULTICAST ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address : flags=0 ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address : flags=0 ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address : flags=8008LOOPBACK,MULTICAST ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address The ioctl only fails because it is called with the wrong ifname. So this is not at all related to SIOCGIFINFO_IN6 or IPv6. if_nametoindex is broken. The interface names are junk bytes such as 0x0628207c followed by a 0x00 that terminates it. Regards, -- Steven Chamberlain ste...@pyro.eu.org -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#740509: ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address
I think I've found a *different* bug while looking for this. A sysctl { CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0 } from kfreebsd-i386 userland on kfreebsd-amd64 9.0 or 10.0 kernel, never seems to fail with ENOMEM! Regardless of given buffer size: Calling sysctl with buffer of size 1024 sysctl() returned 672 bytes Got message of length 152 Got message of length 152 Got message of length 152 Got message of length 152 Got message of length 64 which correctly describes four network interfaces (followed by a shorter NEWADDR message). It goes wrong when the buffer is too small: Calling sysctl with buffer of size 512 sysctl() returned 512 bytes Got message of length 152 Got message of length 152 Got message of length 152 Message of length 152 overflows the buffer! Calling sysctl with buffer of size 128 sysctl() returned 128 bytes Message of length 152 overflows the buffer! The same compiled on kfreebsd-amd64 userland however, also with four network interfaces: Calling sysctl with buffer of size 512 sysctl() failed with errno 12 which is correct behaviour. GNU libc uses an initial buffer size of 512, re-trying with the buffer doubling in size in case of ENOMEM. My own test case is attached. (Note that the sysctl shrinks bufsize to a smaller value if the response fits in the buffer; leaves it unchanged otherwise). Regards, -- Steven Chamberlain ste...@pyro.eu.org -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Processed: Re: Bug#740509: ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address
Processing commands for cont...@bugs.debian.org: # relates to kfreebsd-10 or newer tags 740509 + jessie sid Bug #740509 [freebsd-net-tools] ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address Added tag(s) sid and jessie. thanks Stopping processing here. Please contact me if you need assistance. -- 740509: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740509 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#740509: ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address
Package: freebsd-net-tools Version: 9.2+ds1-1+b1 Severity: critical Control: found -1 10.0-3 On this system, ifconfig is unable to bring up network when running on a 10.0 kernel (this happens with 10.0 debian kernels and with kfreebsd-downloader too). The problem appears to be somehow related to ipv6: $ sudo ifconfig -a : flags=8802BROADCAST,SIMPLEX,MULTICAST ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address : flags=0 ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address : flags=0 ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address : flags=8008LOOPBACK,MULTICAST ifconfig: ioctl(SIOCGIFINFO_IN6): No such device or address -- System Information: Debian Release: 7.4 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: kfreebsd-i386 (i386) Kernel: kFreeBSD 10.0-1-686 Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages freebsd-net-tools depends on: ii libbsd00.6.0-1 ii libc0.12.18-3 ii libexpat1 2.1.0-4 ii libfreebsd-glue-0 0.2.16 ii libipx29.2+ds2-4 ii libjail1 9.2+ds2-4 ii libkvm610.0-4 ii libmemstat39.2+ds2-4 ii libnetgraph4 9.2+ds2-4 ii libsbuf6 9.2+ds2-4 ii libutil-freebsd-9 9.2+ds2-4 -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org