Skip to contentSkip to conversation

Add/Delete IPv6 addresses and netlink

DISCUSSION Ben Greear 2 participants 4 messages Jun 17, 2008 – Jun 21, 2008

Subsystems (2)
lore
Share & tools
lore

Ben Greear

author
#0 lore raw

I am not sure this is a bug, but it is at least making my life difficult in user-space.

This is with 2.6.25.4 kernel plus some of my own hackings not directly related to ipv6.

First:
You can get a state where you never get a netlink address add message, but you do get the delete message. Eth0 has no link, by the way, but it does not seem to matter in this particular case:

ip -6 addr flush eth0
ip link set dev eth0 down
ip -6 addr add 2000::8:2/112 scope global dev eth0 ip -6 addr flush eth0

I would much prefer to have a netlink message when the address is added, regardless of whether it is tentative or not. A new message could be sent when it changes state to/from tentative. As it is, there is no way to verify that an IP address was actually added by listening to netlink messages if the address stays tentative.

Second:

NOTE: I cannot reproduce this problem on FC8's 2.6.24.7-92.fc8 kernel on a different machine. It may just be something lame about my development environment, the different hardware, or perhaps some issue with the newer lkml kernel.

I am not sure whether I am just confused about how all of this is supposed to work or not, but the following commands will leave the global address in tentative state:

ip link set eth1 down; ip -6 addr flush dev eth1; ip -6 addr add 2000::9:2/112 scope global dev eth1 ip link set eth1 up
# Wait 10+ seconds
ip -6 addr show dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 2000::9:2/112 scope global tentative
valid_lft forever preferred_lft forever
inet6 fe80::203:2dff:fe0c:d022/64 scope link
valid_lft forever preferred_lft forever

If you add the global addr while the device is already up, however, then it will not be in tentative state.

Thanks,
Ben

Signature · 1 line
Ben Greear <[email protected]> Candela Technologies Inc  http://www.candelatech.com
#1 lore raw

* Ben Greear <[email protected]> 2008-06-16 18:33

Quoted 4 lines

I am not sure whether I am just confused about how all of this is supposed to work or not, but the
following commands will leave the global address in tentative state:

Quoted 10 lines

ip link set eth1 down; ip -6 addr flush dev eth1; ip -6 addr add 2000::9:2/112 scope global dev eth1 ip link set eth1 up
# Wait 10+ seconds
ip -6 addr show dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 2000::9:2/112 scope global tentative
valid_lft forever preferred_lft forever
inet6 fe80::203:2dff:fe0c:d022/64 scope link
valid_lft forever preferred_lft forever

Do you see a "ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready" message in the console when you up the device?

author
#2 lore raw
Quoted 17 lines · Thomas Graf

* Ben Greear <[email protected]> 2008-06-16 18:33

Quoted 14 lines

I am not sure whether I am just confused about how all of this is supposed to work or not, but the following commands will leave the global address in tentative state:

ip link set eth1 down; ip -6 addr flush dev eth1; ip -6 addr add 2000::9:2/112 scope global dev eth1 ip link set eth1 up
# Wait 10+ seconds
ip -6 addr show dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 2000::9:2/112 scope global tentative
valid_lft forever preferred_lft forever
inet6 fe80::203:2dff:fe0c:d022/64 scope link
valid_lft forever preferred_lft forever

Quoted 3 lines

Do you see a "ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready" message in the console when you up the device?

No, I do not see this message. I do see a driver message in the kernel:

Jun 17 08:43:04 localhost kernel: eth1: link up, 100Mbps, full-duplex, lpa 0x41E1

I'm using the 8139too driver. I notice that it shows full link
speed (100-FD) when the NIC is admin down. Maybe that is causing it to not
go through an expected state change?

I'll work on doing this same test with a vanilla kernel but on this hardware just in case I've screwed something up somewhere...

Thanks,
Ben

Signature · 1 line
Ben Greear <[email protected]> Candela Technologies Inc  http://www.candelatech.com
author
#3 lore raw
Quoted 7 lines · Ben Greear

I'm using the 8139too driver. I notice that it shows full link
speed (100-FD) when the NIC is admin down. Maybe that is causing it to not
go through an expected state change?

I'll work on doing this same test with a vanilla kernel but on this hardware just in case I've screwed something up somewhere...

I just re-did this test on the latest FC8 kernel and the same problem appears.

ip link set eth1 down; ip -6 addr flush dev eth1;
Nothing to flush.
ip -6 addr add 2000::9:2/112 scope global dev eth1
ip link set eth1 up
ip -6 addr show dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 2000::9:2/112 scope global tentative
valid_lft forever preferred_lft forever
inet6 fe80::203:2dff:fe04:65b1/64 scope link
valid_lft forever preferred_lft forever
uname -a
Linux lanforge-65-AF 2.6.25.4-10.fc8 #1 SMP Thu May 22 23:34:09 EDT 2008 i686 i686 i386 GNU/Linux

I wonder if it's something to do with the 8139too driver. Can anyone else with that NIC confirm?

Thanks,
Ben

Signature · 1 line
Ben Greear <[email protected]> Candela Technologies Inc  http://www.candelatech.com