Kernel Bug: IPv6 Neighbor Discovery
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Expired
|
Low
|
Unassigned |
Bug Description
We have discovered what appears to be a bug with the handling of ICMP6 router solicitations on tun interfaces in the Linux kernel. In particular, if an application is not immediately bound to the tun interface, router solicitations are never sent out of the interface. This issue can be replicated easily using the attached scripts.
First, a tun interface is created with permissions for the local user, sudo is used so the script will prompt for the user password.
$ bash rftun0_create.sh
rftun0 created
16: rftun0: <POINTOPOINT,
link/none
Then the interface is configured, given an address, and brought "up" however since there is no application bound to the interface yet there is no carrier.
$ bash rftun0_up.sh
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
rftun0 up
16: rftun0: <NO-CARRIER,
link/none
inet6 fe80::600:
valid_lft forever preferred_lft forever
A simple client is then run to bind to the tun interface and read the first three packets. If things are going well we should see 3 router solicitations, however we instead see no traffic.
$ python simple_
Timed out...
Timed out...
Timed out...
If we bring the interface down and try again with no delay between bringing the interface up and binding the application we see things work as expected.
$ bash rftun0_down.sh
rftun0 down
16: rftun0: <POINTOPOINT,
link/none
$ bash rftun0_up.sh && python simple_
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
rftun0 up
16: rftun0: <NO-CARRIER,
link/none
inet6 fe80::600:
valid_lft forever preferred_lft forever
Read packet from tunnel. 48 bytes.
6000000000083af
Read packet from tunnel. 48 bytes.
6000000000083af
Read packet from tunnel. 48 bytes.
6000000000083af
Furthermore, I can rerun the simple client and continue to receive router solicitations.
Attempting the same procedure again with a small delay replicates the original issue. Notice the sleep statement in between the rftun0_up script and the simple tun client.
$ bash rftun0_down.sh
rftun0 down
16: rftun0: <POINTOPOINT,
link/none
$ bash rftun0_up.sh && sleep 5 && python simple_
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
net.ipv6.
rftun0 up
16: rftun0: <NO-CARRIER,
link/none
inet6 fe80::600:
valid_lft forever preferred_lft forever
Timed out...
Timed out...
Timed out...
This test can be repeated as necessary. On my system, sleep times of 2 seconds or larger seem to always produce the issue, while sleep times of 1 second seem to work most of the time.
This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:
apport-collect 1533304
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.