ifconfig does not display inet6 addresses

Bug #560807 reported by Koos van den Hout
10
This bug affects 1 person
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
          collisions:0 txqueuelen: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,MULTICAST,UP,LOWER_UP> mtu 1500
    inet6 2001:888:1011::694/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::21f:c6ff:fe59:76f6/64 scope link
       valid_lft forever preferred_lft forever

Expected in the ifconfig output: inet6 lines like (from another system):
          inet6 addr: 2001:888:1011:1:21f:e1ff:fe45:2894/64 Scope:Global
          inet6 addr: fe80::21f:e1ff:fe45:2894/64 Scope:Link

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
NonfreeKernelModules: wl
Package: net-tools 1.60-19ubuntu1
PackageArchitecture: i386
ProcEnviron:
 PATH=/home/username/bin:/home/username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: net-tools
Uname: Linux 2.6.24-27-generic i686

Tags: apport-bug
Revision history for this message
Koos van den Hout (koos-kzdoos) wrote :

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:

fe80000000000000021fc6fffe5976f6 05 40 20 80 eth0.3
fe80000000000000021fc6fffe5976f6 03 40 20 80 eth0.1
fe80000000000000021fc6fffe5976f6 02 40 20 80 eth0
fe80000000000000e9a417e97b4f05f1 810 0a 20 80 ppp0

Patch attached.

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

I believe this has likely been fixed in a later release (12.04+). Can anyone confirm?

Changed in net-tools (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for net-tools (Ubuntu) because there has been no activity for 60 days.]

Changed in net-tools (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.