inet6 dhcp doesn't wait for link-local address to leave tentative - dhclient fails to bind
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ifupdown (Ubuntu) |
Triaged
|
High
|
Unassigned |
Bug Description
=
Description: Ubuntu Xenial Xerus (development branch)
Release: 16.04
ifupdown:
Installed: 0.8.10ubuntu1
Candidate: 0.8.10ubuntu1
=
With an /etc/network/
auto eno16780032
iface eno16780032 inet dhcp
iface eno16780032 inet6 dhcp
On boot, ifup starts 'dhclient -6' before the link local address has completed Duplicate Address Discovery (the address is marked 'tentative'). In turn, dhclient reports 'Can't bind to dhcp address: Cannot assign requested address', and fails almost immediately.
It would seem that either wait-for-ll6.sh should wait for the link local address to come up AND stop being tentative, or the dhcp method for inet6 should call settle-dad.sh after wait-for-ll6?
This is partly a race condition, so on slower devices the dad may complete by the time dhclient has got started, however I can regularly reproduce this on a virtual machine.
information type: | Public → Public Security |
information type: | Public Security → Public |
Changed in ifupdown (Ubuntu): | |
status: | Confirmed → Triaged |
importance: | Undecided → High |
milestone: | none → ubuntu-16.04 |
tags: | added: rls-x-incoming |
Adding '-tentative' to the ip call in /lib/ifupdown/ wait-for- ll6.sh corrects this issue for me:
--- /lib/ifupdown/ wait-for- ll6.sh. old 2016-02-08 23:58:02.341820711 +0000 wait-for- ll6.sh 2016-02-09 00:01:18.128000560 +0000 ${IF_LL_ INTERVAL: -0.1}
+++ /lib/ifupdown/
@@ -4,7 +4,7 @@
delay=
for attempt in $(seq 1 $attempts); do
- lladdress=$(ip -6 -o a s dev "$IFACE" scope link)
+ lladdress=$(ip -6 -o a s dev "$IFACE" scope link -tentative)
if [ -n "$lladdress" ]; then
attempt=0
break
(-tentative is "only list addresses which are not in the process of duplicate address detection currently")