ifconfig does not display inet6 addresses
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
net-tools (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: net-tools
Under certain circumstances ifconfig does not show inet6 addresses:
ifconfig eth0.1
eth0.1 Link encap:Ethernet HWaddr 00:1f:c6:59:76:f6
inet addr:10.42.2.1 Bcast:10.42.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17248716 errors:0 dropped:0 overruns:0 frame:0
TX packets:17342654 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:10404798221 (9.6 GB) TX bytes:17783967861 (16.5 GB)
While the addresses are there and usable:
ip -6 addr ls dev eth0.1
3: eth0.1@eth0: <BROADCAST,
inet6 2001:888:
valid_lft forever preferred_lft forever
inet6 fe80::21f:
valid_lft forever preferred_lft forever
Expected in the ifconfig output: inet6 lines like (from another system):
inet6 addr: 2001:888:
inet6 addr: fe80::21f:
Description: Ubuntu 8.04.4 LTS
Release: 8.04
ProblemType: Bug
Architecture: i386
Date: Sun Apr 11 18:39:09 2010
Dependencies:
libgcc1 1:4.2.4-1ubuntu4
gcc-4.2-base 4.2.4-1ubuntu4
libc6 2.7-10ubuntu5
DistroRelease: Ubuntu 8.04
NonfreeKernelMo
Package: net-tools 1.60-19ubuntu1
PackageArchitec
ProcEnviron:
PATH=/
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: net-tools
Uname: Linux 2.6.24-27-generic i686
Downloaded source and hunted:
lib/interface.c line 721 assumes if_idx is a 2 character hex value in /proc/net/if_inet6, which falls over when interfaces get interesting numbers. For example:
fe8000000000000 0021fc6fffe5976 f6 05 40 20 80 eth0.3 0021fc6fffe5976 f6 03 40 20 80 eth0.1 0021fc6fffe5976 f6 02 40 20 80 eth0 0e9a417e97b4f05 f1 810 0a 20 80 ppp0
fe8000000000000
fe8000000000000
fe8000000000000
Patch attached.