group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #16907
[Bug 1718568] Re: dhclient-script fails to wait for link-local address
** Also affects: isc-dhcp (Ubuntu Artful)
Importance: Undecided
Status: New
** Also affects: isc-dhcp (Ubuntu Trusty)
Importance: Undecided
Status: New
** Also affects: isc-dhcp (Ubuntu Xenial)
Importance: Undecided
Status: New
** Also affects: isc-dhcp (Ubuntu Zesty)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1718568
Title:
dhclient-script fails to wait for link-local address
Status in isc-dhcp package in Ubuntu:
New
Status in isc-dhcp source package in Trusty:
New
Status in isc-dhcp source package in Xenial:
New
Status in isc-dhcp source package in Zesty:
New
Status in isc-dhcp source package in Artful:
New
Status in isc-dhcp package in Debian:
New
Bug description:
Summary:
========
If a interface does not yet have a link-local address (as it may have
just been brought up), dhclient -6 <ifname> will fail. The built-in
"wait for link-local address" loop does not function properly, causing
DHCP failure.
Discussion:
===========
In trying to configure isc-dhcp-client 4.3.5-3ubuntu1 for IPv6 on
Ubuntu 17.04, I was finding that on boot I was getting failures with
the logged message "no link-local IPv6 address for <ifname>"
I found that it took several seconds for the link-local address to be
assigned when the interface came up (in this case, the ISP/modem-
facing interface), and worked around it with a script that looks at
/sbin/ifconfig $IFACE | /bin/fgrep -q 'scopeid 0x20'
and loops for a fixed number of times for that to be successful.
On looking at /sbin/dhclient-script it appears that it *tries* to do
the same thing in
# set the link up and wait for ipv6 link local dad to finish
ipv6_link_up_and_dad()
this code sets
out=$(ip -6 -o address show dev "$dev" scope link)
then checks it with a case statement inside of a loop for
case " $out " in
*\ dadfailed\ *)
error "$dev: ipv6 dad failed."
return 1;;
*\ tentative\ *) :;;
*) return 0;;
esac
If there is no link-local address, $out will be empty. The default
case is taken, and the loop exits immediately:
$ echo "'$out'" ; case " $out " in
> *\ dadfailed\ *)
> echo "dadfailed"
> ;;
> *\ tentative\ *)
> echo "tentative"
> ;;
> *)
> echo "default"
> esac
''
default
As a result, there is no "wait for link-local address" and when there
is no link-local address, dhclient fails later on.
Possible Fix:
=============
Adding "the missing case" for "no address" case that continues the
loop is one possible solution.
. case " $out " in
. *\ dadfailed\ *)
. error "$dev: ipv6 dad failed."
. return 1;;
. *\ tentative\ *) :;;
+ " ")
+ :
+ ;;
. *) return 0;;
. esac
At least in my situation, this prevents the failure of dhclient due to
the link-local address not being "ready" yet.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1718568/+subscriptions