inet6 dhcp doesn't wait for link-local address to leave tentative - dhclient fails to bind

Bug #1543352 reported by Graham Clinch
42
This bug affects 8 people
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/interfaces file containing:

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.

Revision history for this message
Graham Clinch (g-clinch) wrote :

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
+++ /lib/ifupdown/wait-for-ll6.sh 2016-02-09 00:01:18.128000560 +0000
@@ -4,7 +4,7 @@
 delay=${IF_LL_INTERVAL:-0.1}

 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")

Graham Clinch (g-clinch)
information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
Wido den Hollander (wido) wrote :

I just ran into the same issue on a 16.04 system in a IPv6-only network.

My network configuration looks like this:

auto eno1
iface eno1 inet6 dhcp

The fix posted by Graham works for me. After modifying that line I succesfully get DHCPv6 after a clean reboot.

Changed in ifupdown (Ubuntu):
status: New → Confirmed
Revision history for this message
Wido den Hollander (wido) wrote :

I have sent a patch for this upstream to Debian. Waiting for it to get accepted.

Revision history for this message
Wido den Hollander (wido) wrote :

The patch has been accepted upstream: https://anonscm.debian.org/cgit/collab-maint/ifupdown.git/commit/?id=bfca5654959d27603eb50747d9998b92f1d7eb41

Version 0.8.11 should be released soon which should fix this issue.

Ubuntu can then fetch this from upstream.

Robie Basak (racb)
Changed in ifupdown (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
milestone: none → ubuntu-16.04
tags: added: rls-x-incoming
Revision history for this message
Amr Ibrahim (amribrahim1987) wrote :

In case 0.8.11 is not released on time, here is the patch from Debian.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "ipv6-wait-properly-for-link-local-address-to-go-through-dad.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Wido den Hollander (wido) wrote :

0.8.11 is out now in Ubuntu and has these fixes.

Ubuntu 16.04 LTS is now released with this bug in there.

Revision history for this message
EdwardClay (eclay) wrote :

How does one get 0.8.11 for ubuntu 16.04? dpkg -l|grep ifupdown returns 0.8.10ubuntu1 and I still have this issue.

Revision history for this message
Jacob (jacob11) wrote :

Still broken in LTS with 0.8.10ubuntu1.1. Sigh. A oneliner patch. Long term suckage. Fix it, ridiculous.

Revision history for this message
Dan Streetman (ddstreet) wrote :

This is being worked in bug 1447715.

Revision history for this message
Jacob (jacob11) wrote :

I have no idea why are you having two bugs for the same issue open. The other bug has been reported over 16 months ago, yet made it into LTS release. Oneliner patch, fixed upstream, 16 month ago. Can we expect the thing released before the long term support is over for Xenial?

Revision history for this message
Dan Streetman (ddstreet) wrote :

@jacob11, I understand your frustration. All I can do is fix the bug.

Revision history for this message
Dan Streetman (ddstreet) wrote :

This was fixed via update to isc-dhcp in bug 1633479. Please see that bug for the specific isc-dhcp version number needed to fix the bug.

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.