[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-03-15 Thread Launchpad Bug Tracker
This bug was fixed in the package isc-dhcp - 4.2.4-7ubuntu12.13

---
isc-dhcp (4.2.4-7ubuntu12.13) trusty; urgency=medium

  * dhclient-script.linux: handle empty case also when waiting for ipv6 link
local DAD. (LP: #1718568)

 -- Dan Streetman   Fri, 02 Mar 2018
13:17:36 -0500

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  Fix Released
Status in isc-dhcp source package in Trusty:
  Fix Released
Status in isc-dhcp source package in Xenial:
  Fix Released
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  Fix Released
Status in isc-dhcp source package in Bionic:
  Fix Released
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  additionally, the current behavior of dhclient when using an interface
  that has no link-local address after being brought up is to exit
  immediately; while after this patch dhclient will wait ~6 seconds
  before exiting (while waiting for the interface to get a non-tentative
  link-local addr).  This is the point of this bug, that some NIC hw
  doesn't show a tentative link-local addr immediately after coming up.
  However, if dhclient -6 is configured to run on an interface without
  any link state at all (e.g. its physical cable is unplugged), then
  while before dhclient would exit immediately with error, it now waits
  6 seconds.  If the system is misconfigured like that, or if someone
  pulls a cable and reboots, then system boot will be delayed an extra 6
  seconds.  However, that short delay for misconfigured/broken systems
  seems acceptable to me, in exchange for allowing dhclient to work with
  slightly slow NIC hw.  Additionally, consider that if the problem is
  instead no dhcpv6 server, dhclient -6 will wait a much, much longer
  amount of time for a dhcpv6 response before giving up.

  
  [other info]

  related bug 1633479

  [original description]

  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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

    # 

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-03-15 Thread Launchpad Bug Tracker
This bug was fixed in the package isc-dhcp - 4.3.3-5ubuntu12.10

---
isc-dhcp (4.3.3-5ubuntu12.10) xenial; urgency=medium

  * dhclient-script.linux: handle empty case also when waiting for ipv6 link
local DAD. (LP: #1718568)

 -- Dan Streetman   Fri, 02 Mar 2018
13:16:05 -0500

** Changed in: isc-dhcp (Ubuntu Xenial)
   Status: Fix Committed => Fix Released

** Changed in: isc-dhcp (Ubuntu Trusty)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  Fix Released
Status in isc-dhcp source package in Trusty:
  Fix Released
Status in isc-dhcp source package in Xenial:
  Fix Released
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  Fix Released
Status in isc-dhcp source package in Bionic:
  Fix Released
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  additionally, the current behavior of dhclient when using an interface
  that has no link-local address after being brought up is to exit
  immediately; while after this patch dhclient will wait ~6 seconds
  before exiting (while waiting for the interface to get a non-tentative
  link-local addr).  This is the point of this bug, that some NIC hw
  doesn't show a tentative link-local addr immediately after coming up.
  However, if dhclient -6 is configured to run on an interface without
  any link state at all (e.g. its physical cable is unplugged), then
  while before dhclient would exit immediately with error, it now waits
  6 seconds.  If the system is misconfigured like that, or if someone
  pulls a cable and reboots, then system boot will be delayed an extra 6
  seconds.  However, that short delay for misconfigured/broken systems
  seems acceptable to me, in exchange for allowing dhclient to work with
  slightly slow NIC hw.  Additionally, consider that if the problem is
  instead no dhcpv6 server, dhclient -6 will wait a much, much longer
  amount of time for a dhcpv6 response before giving up.

  
  [other info]

  related bug 1633479

  [original description]

  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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 

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-03-15 Thread Launchpad Bug Tracker
This bug was fixed in the package isc-dhcp - 4.3.5-3ubuntu2.3

---
isc-dhcp (4.3.5-3ubuntu2.3) artful; urgency=medium

  * dhclient-script.linux: handle empty case also when waiting for ipv6 link
local DAD. (LP: #1718568)

 -- Dan Streetman   Fri, 02 Mar 2018
13:14:51 -0500

** Changed in: isc-dhcp (Ubuntu Artful)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  Fix Released
Status in isc-dhcp source package in Trusty:
  Fix Committed
Status in isc-dhcp source package in Xenial:
  Fix Released
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  Fix Released
Status in isc-dhcp source package in Bionic:
  Fix Released
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  additionally, the current behavior of dhclient when using an interface
  that has no link-local address after being brought up is to exit
  immediately; while after this patch dhclient will wait ~6 seconds
  before exiting (while waiting for the interface to get a non-tentative
  link-local addr).  This is the point of this bug, that some NIC hw
  doesn't show a tentative link-local addr immediately after coming up.
  However, if dhclient -6 is configured to run on an interface without
  any link state at all (e.g. its physical cable is unplugged), then
  while before dhclient would exit immediately with error, it now waits
  6 seconds.  If the system is misconfigured like that, or if someone
  pulls a cable and reboots, then system boot will be delayed an extra 6
  seconds.  However, that short delay for misconfigured/broken systems
  seems acceptable to me, in exchange for allowing dhclient to work with
  slightly slow NIC hw.  Additionally, consider that if the problem is
  instead no dhcpv6 server, dhclient -6 will wait a much, much longer
  amount of time for a dhcpv6 response before giving up.

  
  [other info]

  related bug 1633479

  [original description]

  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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 

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-03-13 Thread Dan Streetman
The only failure shown now seems to be network-manager, which is failing its 
'test_no_ap' test; that appears to have been failing for a while:
http://autopkgtest.ubuntu.com/packages/n/network-manager/artful/amd64

also there's a bug opened today for it:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1755466

The test log in that bug description shows the same failure, test_no_ap,
and the log shows the isc-dhcp installed package version is
4.3.5-3ubuntu2.2, which doesn't contain the change from this bug.

The other autopkgtest it's failing is the 'killswitches-no-urfkill'
test; it fails at this check:

if ! LC_MESSAGES=C nmcli radio wifi | grep -qc disabled; then
echo "ERROR: NM could not track device state."

This is failing because the test case is faulty; it's being tracked in this bug:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1733321

So I think we can ignore both these autopkgtest failures.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  Fix Released
Status in isc-dhcp source package in Trusty:
  Fix Committed
Status in isc-dhcp source package in Xenial:
  Fix Committed
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  Fix Committed
Status in isc-dhcp source package in Bionic:
  Fix Released
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  additionally, the current behavior of dhclient when using an interface
  that has no link-local address after being brought up is to exit
  immediately; while after this patch dhclient will wait ~6 seconds
  before exiting (while waiting for the interface to get a non-tentative
  link-local addr).  This is the point of this bug, that some NIC hw
  doesn't show a tentative link-local addr immediately after coming up.
  However, if dhclient -6 is configured to run on an interface without
  any link state at all (e.g. its physical cable is unplugged), then
  while before dhclient would exit immediately with error, it now waits
  6 seconds.  If the system is misconfigured like that, or if someone
  pulls a cable and reboots, then system boot will be delayed an extra 6
  seconds.  However, that short delay for misconfigured/broken systems
  seems acceptable to me, in exchange for allowing dhclient to work with
  slightly slow NIC hw.  Additionally, consider that if the problem is
  instead no dhcpv6 server, dhclient -6 will wait a much, much longer
  amount of time for a dhcpv6 response before giving up.

  
  [other info]

  related bug 1633479

  [original description]

  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  will fail. The built-in
  "wait for link-local address" loop does not function properly, causing
  DHCP failure.

  Discussion:
  

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-03-12 Thread Łukasz Zemczak
Hey Dan! I see some autopkgtests failing for this upload for artful, I
re-ran them to see how frequently those are reproducible. The systemd
one is flaky, but I would like someone to take a look at the network-
manager ones.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  Fix Released
Status in isc-dhcp source package in Trusty:
  Fix Committed
Status in isc-dhcp source package in Xenial:
  Fix Committed
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  Fix Committed
Status in isc-dhcp source package in Bionic:
  Fix Released
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  additionally, the current behavior of dhclient when using an interface
  that has no link-local address after being brought up is to exit
  immediately; while after this patch dhclient will wait ~6 seconds
  before exiting (while waiting for the interface to get a non-tentative
  link-local addr).  This is the point of this bug, that some NIC hw
  doesn't show a tentative link-local addr immediately after coming up.
  However, if dhclient -6 is configured to run on an interface without
  any link state at all (e.g. its physical cable is unplugged), then
  while before dhclient would exit immediately with error, it now waits
  6 seconds.  If the system is misconfigured like that, or if someone
  pulls a cable and reboots, then system boot will be delayed an extra 6
  seconds.  However, that short delay for misconfigured/broken systems
  seems acceptable to me, in exchange for allowing dhclient to work with
  slightly slow NIC hw.  Additionally, consider that if the problem is
  instead no dhcpv6 server, dhclient -6 will wait a much, much longer
  amount of time for a dhcpv6 response before giving up.

  
  [other info]

  related bug 1633479

  [original description]

  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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 

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-03-08 Thread Dan Streetman
trusty:

host~$ virsh domif-setlink lp1718568-trusty vnet4 down
Device updated successfully

ubuntu@lp1718568-trusty:~$ dpkg -l | grep isc-dhcp
ii  isc-dhcp-client  4.2.4-7ubuntu12.12 
amd64ISC DHCP client
ii  isc-dhcp-common  4.2.4-7ubuntu12.12 
amd64common files used by all the isc-dhcp* packages
ubuntu@lp1718568-trusty:~$ sudo ip l set down dev eth1
ubuntu@lp1718568-trusty:~$ sudo ip l show eth1
3: eth1:  mtu 1500 qdisc noop state DOWN mode DEFAULT 
group default qlen 1000
link/ether 52:54:00:1f:1a:c6 brd ff:ff:ff:ff:ff:ff

ubuntu@lp1718568-trusty:~$ sudo dhclient -v -6 eth1
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

no link-local IPv6 address for eth1


with -updates pkg:

ubuntu@lp1718568-trusty:~$ dpkg -l | grep isc-dhcp
ii  isc-dhcp-client  4.2.4-7ubuntu12.13 
amd64ISC DHCP client
ii  isc-dhcp-common  4.2.4-7ubuntu12.13 
amd64common files used by all the isc-dhcp* packages
ubuntu@lp1718568-trusty:~$ sudo ip l set down dev eth1
ubuntu@lp1718568-trusty:~$ sudo ip l show eth1
3: eth1:  mtu 1500 qdisc pfifo_fast state DOWN mode 
DEFAULT group default qlen 1000
link/ether 52:54:00:1f:1a:c6 brd ff:ff:ff:ff:ff:ff

ubuntu@lp1718568-trusty:~$ sudo dhclient -v -6 eth1
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

(blocks)

host$ virsh domif-setlink lp1718568-trusty vnet4 up
Device updated successfully

Listening on Socket/eth1
Sending on   Socket/eth1
PRC: Soliciting for leases (INIT).
XMT: Forming Solicit, 0 ms elapsed.
XMT:  X-- IA_NA 00:1f:1a:c6
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT: Solicit on eth1, interval 1010ms.
RCV: Advertise message on eth1 from fe80::5054:ff:fec9:897c.
RCV:  X-- IA_NA 00:1f:1a:c6
RCV:  | X-- starts 1520536242
RCV:  | X-- t1 - renew  +3600
RCV:  | X-- t2 - rebind +7200
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR 2001:db8::93
RCV:  | | | X-- Preferred lifetime 604800.
RCV:  | | | X-- Max lifetime 2592000.
RCV:  X-- Server ID: 00:01:00:01:22:2c:61:12:52:54:00:c9:89:7c
RCV:  Advertisement recorded.
PRC: Selecting best advertised lease.
PRC: Considering best lease.
PRC:  X-- Initial candidate 00:01:00:01:22:2c:61:12:52:54:00:c9:89:7c (s: 155, 
p: 0).
XMT: Forming Request, 0 ms elapsed.
XMT:  X-- IA_NA 00:1f:1a:c6
XMT:  | X-- Requested renew  +3600
XMT:  | X-- Requested rebind +5400
XMT:  | | X-- IAADDR 2001:db8::93
XMT:  | | | X-- Preferred lifetime +7200
XMT:  | | | X-- Max lifetime +7500
XMT:  V IA_NA appended.
XMT: Request on eth1, interval 1040ms.
RCV: Reply message on eth1 from fe80::5054:ff:fec9:897c.
RCV:  X-- IA_NA 00:1f:1a:c6
RCV:  | X-- starts 1520536243
RCV:  | X-- t1 - renew  +3600
RCV:  | X-- t2 - rebind +7200
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR 2001:db8::93
RCV:  | | | X-- Preferred lifetime 604800.
RCV:  | | | X-- Max lifetime 2592000.
RCV:  X-- Server ID: 00:01:00:01:22:2c:61:12:52:54:00:c9:89:7c
PRC: Bound to lease 00:01:00:01:22:2c:61:12:52:54:00:c9:89:7c.


** Tags removed: verification-needed verification-needed-artful 
verification-needed-trusty verification-needed-xenial
** Tags added: verification-done verification-done-artful 
verification-done-trusty verification-done-xenial

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  Fix Released
Status in isc-dhcp source package in Trusty:
  Fix Committed
Status in isc-dhcp source package in Xenial:
  Fix Committed
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  Fix Committed
Status in isc-dhcp source package in Bionic:
  Fix Released
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-03-08 Thread Dan Streetman
xenial:

ubuntu@lp1718568-xenial:~$ dpkg -l | grep isc-dhcp
ii  isc-dhcp-client  4.3.3-5ubuntu12.9  
amd64DHCP client for automatically obtaining an IP address
ii  isc-dhcp-common  4.3.3-5ubuntu12.9  
amd64common files used by all of the isc-dhcp packages

host$ virsh domif-setlink lp1718568-xenial vnet6 down
Device updated successfully

ubuntu@lp1718568-xenial:~$ sudo dhclient -v -6 ens7
Internet Systems Consortium DHCP Client 4.3.3
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

no link-local IPv6 address for ens7

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging..

exiting.


with -proposed pkg:

ubuntu@lp1718568-xenial:~$ dpkg -l | grep isc-dhcp
ii  isc-dhcp-client  4.3.3-5ubuntu12.10 
amd64DHCP client for automatically obtaining an IP address
ii  isc-dhcp-common  4.3.3-5ubuntu12.10 
amd64common files used by all of the isc-dhcp packages
ubuntu@lp1718568-xenial:~$ sudo ip l set down dev ens7
ubuntu@lp1718568-xenial:~$ sudo ip l show dev ens7
3: ens7:  mtu 1500 qdisc pfifo_fast state DOWN mode 
DEFAULT group default qlen 1000
link/ether 52:54:00:f3:99:a8 brd ff:ff:ff:ff:ff:ff

ubuntu@lp1718568-xenial:~$ sudo dhclient -v -6 ens7
Internet Systems Consortium DHCP Client 4.3.3
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

(blocks)

$ virsh domif-setlink lp1718568-xenial vnet6 up
Device updated successfully

Listening on Socket/ens7
Sending on   Socket/ens7
Created duid \000\001\000\001\"4D\337RT\000\363\231\250.
PRC: Soliciting for leases (INIT).
XMT: Forming Solicit, 0 ms elapsed.
XMT:  X-- IA_NA 00:f3:99:a8
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT: Solicit on ens7, interval 1040ms.
RCV: Advertise message on ens7 from fe80::5054:ff:fec9:897c.
RCV:  X-- IA_NA 00:f3:99:a8
RCV:  | X-- starts 1520535647
RCV:  | X-- t1 - renew  +3600
RCV:  | X-- t2 - rebind +7200
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR 2001:db8::98
RCV:  | | | X-- Preferred lifetime 604800.
RCV:  | | | X-- Max lifetime 2592000.
RCV:  X-- Server ID: 00:01:00:01:22:2c:61:12:52:54:00:c9:89:7c
RCV:  Advertisement recorded.
PRC: Selecting best advertised lease.
PRC: Considering best lease.
PRC:  X-- Initial candidate 00:01:00:01:22:2c:61:12:52:54:00:c9:89:7c (s: 155, 
p: 0).
XMT: Forming Request, 0 ms elapsed.
XMT:  X-- IA_NA 00:f3:99:a8
XMT:  | X-- Requested renew  +3600
XMT:  | X-- Requested rebind +5400
XMT:  | | X-- IAADDR 2001:db8::98
XMT:  | | | X-- Preferred lifetime +7200
XMT:  | | | X-- Max lifetime +7500
XMT:  V IA_NA appended.
XMT: Request on ens7, interval 990ms.
RCV: Reply message on ens7 from fe80::5054:ff:fec9:897c.
RCV:  X-- IA_NA 00:f3:99:a8
RCV:  | X-- starts 1520535648
RCV:  | X-- t1 - renew  +3600
RCV:  | X-- t2 - rebind +7200
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR 2001:db8::98
RCV:  | | | X-- Preferred lifetime 604800.
RCV:  | | | X-- Max lifetime 2592000.
RCV:  X-- Server ID: 00:01:00:01:22:2c:61:12:52:54:00:c9:89:7c
PRC: Bound to lease 00:01:00:01:22:2c:61:12:52:54:00:c9:89:7c.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  Fix Released
Status in isc-dhcp source package in Trusty:
  Fix Committed
Status in isc-dhcp source package in Xenial:
  Fix Committed
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  Fix Committed
Status in isc-dhcp source package in Bionic:
  Fix Released
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-03-08 Thread Dan Streetman
artful:

ubuntu@lp1718568-artful:~$ dpkg -l | grep isc-dhcp
ii  isc-dhcp-client4.3.5-3ubuntu2.2 
amd64DHCP client for automatically obtaining an IP address
ii  isc-dhcp-common4.3.5-3ubuntu2.2 
amd64common manpages relevant to all of the isc-dhcp 
packages

ubuntu@lp1718568-artful:~$ sudo ip l set down dev ens7
ubuntu@lp1718568-artful:~$ sudo ip l show ens7
3: ens7:  mtu 1500 qdisc pfifo_fast state DOWN mode 
DEFAULT group default qlen 1000
link/ether 52:54:00:bf:16:8a brd ff:ff:ff:ff:ff:ff

(on host):
$ virsh domif-setlink lp1718568-artful vnet8 down
Device updated successfully

(back on guest):
ubuntu@lp1718568-artful:~$ sudo dhclient -v -6 ens7
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

no link-local IPv6 address for ens7

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging..

exiting.


after updating to -proposed:

ubuntu@lp1718568-artful:~$ sudo ip l set down dev ens7
ubuntu@lp1718568-artful:~$ sudo ip l show ens7
3: ens7:  mtu 1500 qdisc pfifo_fast state DOWN mode 
DEFAULT group default qlen 1000
link/ether 52:54:00:bf:16:8a brd ff:ff:ff:ff:ff:ff
ubuntu@lp1718568-artful:~$ dpkg -l | grep isc-dhcp
ii  isc-dhcp-client4.3.5-3ubuntu2.3 
amd64DHCP client for automatically obtaining an IP address
ii  isc-dhcp-common4.3.5-3ubuntu2.3 
amd64common manpages relevant to all of the isc-dhcp 
packages

ubuntu@lp1718568-artful:~$ sudo dhclient -v -6 ens7
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

(blocks, waiting for ipv6 link-local addr)

(on host):
$ virsh domif-setlink lp1718568-artful vnet8 up
Device updated successfully

(back on guest):
Listening on Socket/ens7
Sending on   Socket/ens7
PRC: Soliciting for leases (INIT).
XMT: Forming Solicit, 0 ms elapsed.
XMT:  X-- IA_NA 00:bf:16:8a
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT:  | X-- Request address 2001:db8::99.
XMT:  | | X-- Request preferred in +7200
XMT:  | | X-- Request valid in +10800
XMT: Solicit on ens7, interval 1020ms.
RCV: Advertise message on ens7 from fe80::5054:ff:fec9:897c.
RCV:  X-- IA_NA 00:bf:16:8a
RCV:  | X-- starts 1520535276
RCV:  | X-- t1 - renew  +3600
RCV:  | X-- t2 - rebind +7200
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR 2001:db8::99
RCV:  | | | X-- Preferred lifetime 604800.
RCV:  | | | X-- Max lifetime 2592000.
RCV:  X-- Server ID: 00:01:00:01:22:2c:61:12:52:54:00:c9:89:7c
RCV:  Advertisement recorded.
PRC: Selecting best advertised lease.
PRC: Considering best lease.
PRC:  X-- Initial candidate 00:01:00:01:22:2c:61:12:52:54:00:c9:89:7c (s: 
10105, p: 0).
XMT: Forming Request, 0 ms elapsed.
XMT:  X-- IA_NA 00:bf:16:8a
XMT:  | X-- Requested renew  +3600
XMT:  | X-- Requested rebind +5400
XMT:  | | X-- IAADDR 2001:db8::99
XMT:  | | | X-- Preferred lifetime +7200
XMT:  | | | X-- Max lifetime +7500
XMT:  V IA_NA appended.
XMT: Request on ens7, interval 940ms.
RCV: Reply message on ens7 from fe80::5054:ff:fec9:897c.
RCV:  X-- IA_NA 00:bf:16:8a
RCV:  | X-- starts 1520535277
RCV:  | X-- t1 - renew  +3600
RCV:  | X-- t2 - rebind +7200
RCV:  | X-- [Options]
RCV:  | | X-- IAADDR 2001:db8::99
RCV:  | | | X-- Preferred lifetime 604800.
RCV:  | | | X-- Max lifetime 2592000.
RCV:  X-- Server ID: 00:01:00:01:22:2c:61:12:52:54:00:c9:89:7c
PRC: Bound to lease 00:01:00:01:22:2c:61:12:52:54:00:c9:89:7c.


-proposed package verified

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  Fix Released
Status in isc-dhcp source package in Trusty:
  Fix Committed
Status in isc-dhcp source package in Xenial:
  Fix Committed
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  Fix Committed
Status in isc-dhcp source package in Bionic:
  Fix Released
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the 

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-03-05 Thread Łukasz Zemczak
Hello Jeff, or anyone else affected,

Accepted isc-dhcp into artful-proposed. The package will build now and
be available at https://launchpad.net/ubuntu/+source/isc-
dhcp/4.3.5-3ubuntu2.3 in a few hours, and then in the -proposed
repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested and change the tag from
verification-needed-artful to verification-done-artful. If it does not
fix the bug for you, please add a comment stating that, and change the
tag to verification-failed-artful. In either case, without details of
your testing we will not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance!

** Changed in: isc-dhcp (Ubuntu Artful)
   Status: In Progress => Fix Committed

** Tags added: verification-needed verification-needed-artful

** Changed in: isc-dhcp (Ubuntu Xenial)
   Status: In Progress => Fix Committed

** Tags added: verification-needed-xenial

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  Fix Released
Status in isc-dhcp source package in Trusty:
  Fix Committed
Status in isc-dhcp source package in Xenial:
  Fix Committed
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  Fix Committed
Status in isc-dhcp source package in Bionic:
  Fix Released
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  additionally, the current behavior of dhclient when using an interface
  that has no link-local address after being brought up is to exit
  immediately; while after this patch dhclient will wait ~6 seconds
  before exiting (while waiting for the interface to get a non-tentative
  link-local addr).  This is the point of this bug, that some NIC hw
  doesn't show a tentative link-local addr immediately after coming up.
  However, if dhclient -6 is configured to run on an interface without
  any link state at all (e.g. its physical cable is unplugged), then
  while before dhclient would exit immediately with error, it now waits
  6 seconds.  If the system is misconfigured like that, or if someone
  pulls a cable and reboots, then system boot will be delayed an extra 6
  seconds.  However, that short delay for misconfigured/broken systems
  seems acceptable to me, in exchange for allowing dhclient to work with
  slightly slow NIC hw.  Additionally, consider that if the problem is
  instead no dhcpv6 server, dhclient -6 will wait a much, much longer
  amount of time for a dhcpv6 response before giving 

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-03-02 Thread Dan Streetman
> Is there no other more reliable way to reproduce the case that's being
fixed here

sure yes, here's what i did; first, setup:

-create VMs for the releases (T/X/A), managed by virsh (e.g. with uvt-kvm or 
whatever)
-add a second interface to each of them, e.g.:

$ virsh attach-interface lp1718568-artful network default --model virtio
--persistent

-set up another server/vm/container/whatever, connected to the same
network as the test VM second interfaces, and install and configure isc-
dhcp-server (or dnsmasq or whatever dhcpv6 server) on that to serve out
dhcpv6

now on each release VM:

-check the virsh interface you'll be using, e.g.:

$ virsh domiflist lp1718568-artful
Interface  Type   Source Model   MAC
---
vnet3  networkdefaultvirtio  52:54:00:3f:b9:ad
vnet0  networkdefaultvirtio  52:54:00:bf:16:8a

confirm which matches the test interface in the VM using mac; in my case
it's vnet0.  now, bring its link state down using virsh:

$ virsh domif-setlink lp1718568-artful vnet0 down

and ssh into the test VM (on its first, still working, default interface
- or use virt-viewer or whatever) and test dhclient -6, making sure to
first verify the test interface is down (i.e. that it doesn't already
have a link-local addr):

ubuntu@lp1718568-artful:~$ sudo ip a show ens7
3: ens7:  mtu 1500 qdisc pfifo_fast state DOWN group 
default qlen 1000
link/ether 52:54:00:bf:16:8a brd ff:ff:ff:ff:ff:ff

ubuntu@lp1718568-artful:~$ sudo dhclient -v -6 ens7
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

no link-local IPv6 address for ens7

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging..

exiting.


as expected (for this bug), that fails immediately.  now, upgrade to the test 
version in my ppa
https://launchpad.net/~ddstreet/+archive/ubuntu/lp1718568

ubuntu@lp1718568-artful:~$ dpkg -l | grep isc-dhcp
ii  isc-dhcp-client
4.3.5-3ubuntu2.2+hf1718568v20180302b1amd64DHCP client for 
automatically obtaining an IP address
ii  isc-dhcp-common
4.3.5-3ubuntu2.2+hf1718568v20180302b1amd64common manpages 
relevant to all of the isc-dhcp packages


again, make sure the interface is down (no link-local addr) and try the new 
dhclient:

ubuntu@lp1718568-artful:~$ sudo ip l set down dev ens7
ubuntu@lp1718568-artful:~$ sudo ip a show ens7
3: ens7:  mtu 1500 qdisc pfifo_fast state DOWN group 
default qlen 1000
link/ether 52:54:00:bf:16:8a brd ff:ff:ff:ff:ff:ff

ubuntu@lp1718568-artful:~$ sudo dhclient -v -6 ens7
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/


now, instead of immediately exiting with error, it waits - this is where it's 
waiting for the interface to get a 'tentative' link-local address, and then 
complete dad to switch to normal link-local so dhcpv6 can begin.  After only a 
few seconds (dhclient-script.linux defaults to 60 attempts, with 0.1 second 
delays between, so ~6 seconds of waiting) it will give up and exit as before:

no link-local IPv6 address for ens7

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging..

exiting.


Ok, we verified the patch does force dhclient to wait for the link-local addr 
(even without any tentative addr); now bring the interface back down and 
re-test, but this time immediately switch back to the host and use virsh to 
bring the link state back up (before dhclient times out):

ubuntu@lp1718568-artful:~$ sudo ip l set down dev ens7
ubuntu@lp1718568-artful:~$ sudo ip a show ens7
3: ens7:  mtu 1500 qdisc pfifo_fast state DOWN group 
default qlen 1000
link/ether 52:54:00:bf:16:8a brd ff:ff:ff:ff:ff:ff

ubuntu@lp1718568-artful:~$ sudo dhclient -v -6 ens7
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/


now quickly in the host:

$ virsh domif-setlink lp1718568-artful vnet0 up
Device updated successfully


and back in the test VM:

Listening on Socket/ens7
Sending on   Socket/ens7
PRC: Soliciting for leases (INIT).
XMT: Forming Solicit, 0 ms elapsed.
XMT:  

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-03-01 Thread Dan Streetman
ok i'll recreate the debdiffs and reupload.

** Tags removed: verification-needed verification-needed-artful
verification-needed-trusty verification-needed-xenial

** Changed in: isc-dhcp (Ubuntu Artful)
   Status: Fix Committed => In Progress

** Changed in: isc-dhcp (Ubuntu Xenial)
   Status: Fix Committed => In Progress

** Changed in: isc-dhcp (Ubuntu Trusty)
   Status: Fix Committed => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  Fix Released
Status in isc-dhcp source package in Trusty:
  In Progress
Status in isc-dhcp source package in Xenial:
  In Progress
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  In Progress
Status in isc-dhcp source package in Bionic:
  Fix Released
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  [other info]

  related bug 1633479

  
  [original description]

  
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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
  

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-03-01 Thread Marc Deslauriers
Unfortunately, this SRU was superseded by a security update.

New debdiffs need to be prepared on top of the security updates.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  Fix Released
Status in isc-dhcp source package in Trusty:
  Fix Committed
Status in isc-dhcp source package in Xenial:
  Fix Committed
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  Fix Committed
Status in isc-dhcp source package in Bionic:
  Fix Released
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  [other info]

  related bug 1633479

  
  [original description]

  
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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\ *) :;;
  +    "  ")
  +    :
  +    ;;
  .

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-02-27 Thread Łukasz Zemczak
I will be accepting this, but I'm a bit worried about the test case here
as it relies on a race-related occasional failure and it might be hard
to test reliably. Is there no other more reliable way to reproduce the
case that's being fixed here, e.g. to delay the initial tentative link-
local address assignment? Probably not?

** Changed in: isc-dhcp (Ubuntu Artful)
   Status: In Progress => Fix Committed

** Tags added: verification-needed verification-needed-artful

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  Fix Released
Status in isc-dhcp source package in Trusty:
  Fix Committed
Status in isc-dhcp source package in Xenial:
  Fix Committed
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  Fix Committed
Status in isc-dhcp source package in Bionic:
  Fix Released
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  [other info]

  related bug 1633479

  
  [original description]

  
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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 

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-02-23 Thread Launchpad Bug Tracker
This bug was fixed in the package isc-dhcp - 4.3.5-3ubuntu4

---
isc-dhcp (4.3.5-3ubuntu4) bionic; urgency=medium

  * dhclient-script.linux: handle empty case also when waiting for ipv6 link
local DAD. (LP: #1718568)

 -- Dan Streetman   Thu, 12 Oct 2017
08:48:06 -0400

** Changed in: isc-dhcp (Ubuntu Bionic)
   Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  Fix Released
Status in isc-dhcp source package in Trusty:
  In Progress
Status in isc-dhcp source package in Xenial:
  In Progress
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  In Progress
Status in isc-dhcp source package in Bionic:
  Fix Released
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  [other info]

  related bug 1633479

  
  [original description]

  
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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 

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-02-20 Thread Dan Streetman
** Patch added: "lp1718568-bionic.debdiff"
   
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1718568/+attachment/5059088/+files/lp1718568-bionic.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  In Progress
Status in isc-dhcp source package in Trusty:
  In Progress
Status in isc-dhcp source package in Xenial:
  In Progress
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  In Progress
Status in isc-dhcp source package in Bionic:
  In Progress
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  [other info]

  related bug 1633479

  
  [original description]

  
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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\ *) :;;
  +    "  ")
  +    :
  +    

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2018-02-16 Thread Dan Streetman
** Changed in: isc-dhcp (Ubuntu Zesty)
   Status: In Progress => Won't Fix

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  In Progress
Status in isc-dhcp source package in Trusty:
  In Progress
Status in isc-dhcp source package in Xenial:
  In Progress
Status in isc-dhcp source package in Zesty:
  Won't Fix
Status in isc-dhcp source package in Artful:
  In Progress
Status in isc-dhcp source package in Bionic:
  In Progress
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  [other info]

  related bug 1633479

  
  [original description]

  
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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 

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2017-10-12 Thread Dan Streetman
** Changed in: isc-dhcp (Ubuntu Bb-series)
   Status: New => In Progress

** Changed in: isc-dhcp (Ubuntu Bb-series)
   Importance: Undecided => Medium

** Changed in: isc-dhcp (Ubuntu Bb-series)
 Assignee: (unassigned) => Dan Streetman (ddstreet)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  In Progress
Status in isc-dhcp source package in Trusty:
  In Progress
Status in isc-dhcp source package in Xenial:
  In Progress
Status in isc-dhcp source package in Zesty:
  In Progress
Status in isc-dhcp source package in Artful:
  In Progress
Status in isc-dhcp source package in bb-series:
  In Progress
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  [other info]

  related bug 1633479

  
  [original description]

  
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

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

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2017-10-12 Thread Eric Desrochers
** Also affects: isc-dhcp (Ubuntu Bb-series)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  In Progress
Status in isc-dhcp source package in Trusty:
  In Progress
Status in isc-dhcp source package in Xenial:
  In Progress
Status in isc-dhcp source package in Zesty:
  In Progress
Status in isc-dhcp source package in Artful:
  In Progress
Status in isc-dhcp source package in bb-series:
  In Progress
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  [other info]

  related bug 1633479

  
  [original description]

  
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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 

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2017-10-12 Thread Dan Streetman
Hi Jeff,

Thanks for reporting and debugging this!

I've tweaked your patch from comment 2 slightly, you can see my version
in the debdiffs attached.  I was concerned that just a "  " check may
not always work right, so I explicitly check for the ip output to
contain 'inet6' (but not 'tentative') which is really what the function
is supposed to be doing.

Since this needs to go into the development release, the SRUs to older
releases have to wait.  And since artful is currently in freeze, this
will need to wait for the b-series development to start before we can
add the fix, and then SRU the fixes back to artful and older.  I'll come
back to this once b-series development has started and get the process
rolling.

Until then, I built test packages here:
https://launchpad.net/~ddstreet/+archive/ubuntu/lp1718568

can you verify that fixes it on your system?

** Description changed:

+ [impact]
+ 
+ bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
+ dhcpv6 requests; it must wait until DAD completes.
+ 
+ However, the change made in that bug does not account for the case where
+ the 'tentative' check is done before the interface has even set up a
+ link-local address; its case statement assumes if there is no
+ 'tentative' or 'dadfailed' string in the output, the link-local address
+ is ready to use.  When the address check finds no address at all, this
+ will return as successful, even though it shouldn't, and dhclient will
+ fail to get the dhcpv6 address.
+ 
+ [test case]
+ 
+ on a system that is configured for dhcpv6 on one or more of its
+ interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
+ that are slower to actually set up their initial tentative link-local
+ address, they will occasionally fail, since the current code is a race
+ between the kernel adding the tentative link-local address, and the
+ dhclient-script.linux code checking the interface for a tentative
+ address.
+ 
+ with the patch to correct this, even interfaces slow to add their
+ tentative link-local address should correctly wait for the address to
+ get added, and then transition from tentative to normal, and then begin
+ the dhcpv6 process.
+ 
+ [regression potential]
+ 
+ errors in this function can cause dhclient to fail to get a ipv6 address
+ for an interface; regression would happen if this patch makes it fail
+ more than it already is failing, but would not cause other failures or
+ problems after getting an ipv6 address; this patch will affect only
+ startup-time.
+ 
+ [other info]
+ 
+ related bug 1633479
+ 
+ 
+ [original description]
+ 
+ 
  Summary:
  
  
  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "
  
  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: 

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2017-10-12 Thread Dan Streetman
** Patch added: "lp1718568-artful.debdiff"
   
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1718568/+attachment/4968656/+files/lp1718568-artful.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  In Progress
Status in isc-dhcp source package in Trusty:
  In Progress
Status in isc-dhcp source package in Xenial:
  In Progress
Status in isc-dhcp source package in Zesty:
  In Progress
Status in isc-dhcp source package in Artful:
  In Progress
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  [other info]

  related bug 1633479

  
  [original description]

  
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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


[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2017-10-12 Thread Dan Streetman
** Patch added: "lp1718568-xenial.debdiff"
   
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1718568/+attachment/4968658/+files/lp1718568-xenial.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  In Progress
Status in isc-dhcp source package in Trusty:
  In Progress
Status in isc-dhcp source package in Xenial:
  In Progress
Status in isc-dhcp source package in Zesty:
  In Progress
Status in isc-dhcp source package in Artful:
  In Progress
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  [other info]

  related bug 1633479

  
  [original description]

  
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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


[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2017-10-12 Thread Dan Streetman
** Patch added: "lp1718568-trusty.debdiff"
   
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1718568/+attachment/4968659/+files/lp1718568-trusty.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  In Progress
Status in isc-dhcp source package in Trusty:
  In Progress
Status in isc-dhcp source package in Xenial:
  In Progress
Status in isc-dhcp source package in Zesty:
  In Progress
Status in isc-dhcp source package in Artful:
  In Progress
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  [other info]

  related bug 1633479

  
  [original description]

  
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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


[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2017-10-12 Thread Dan Streetman
** Patch added: "lp1718568-zesty.debdiff"
   
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1718568/+attachment/4968657/+files/lp1718568-zesty.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  In Progress
Status in isc-dhcp source package in Trusty:
  In Progress
Status in isc-dhcp source package in Xenial:
  In Progress
Status in isc-dhcp source package in Zesty:
  In Progress
Status in isc-dhcp source package in Artful:
  In Progress
Status in isc-dhcp package in Debian:
  New

Bug description:
  [impact]

  bug 1633479 made a change to isc-dhcp to wait for an interface's link-local 
ipv6 address to switch from 'tentative' to normal, because all link-local 
addresses briefly go through a 'tentative' state while the kernel is performing 
ipv6 link-local 'duplicate address detection' (DAD).  While in the 'tentative' 
state, dhclient can't take over the interface and send out
  dhcpv6 requests; it must wait until DAD completes.

  However, the change made in that bug does not account for the case
  where the 'tentative' check is done before the interface has even set
  up a link-local address; its case statement assumes if there is no
  'tentative' or 'dadfailed' string in the output, the link-local
  address is ready to use.  When the address check finds no address at
  all, this will return as successful, even though it shouldn't, and
  dhclient will fail to get the dhcpv6 address.

  [test case]

  on a system that is configured for dhcpv6 on one or more of its
  interfaces, repeatedly try to get the dhcpv6 address.  For interfaces
  that are slower to actually set up their initial tentative link-local
  address, they will occasionally fail, since the current code is a race
  between the kernel adding the tentative link-local address, and the
  dhclient-script.linux code checking the interface for a tentative
  address.

  with the patch to correct this, even interfaces slow to add their
  tentative link-local address should correctly wait for the address to
  get added, and then transition from tentative to normal, and then
  begin the dhcpv6 process.

  [regression potential]

  errors in this function can cause dhclient to fail to get a ipv6
  address for an interface; regression would happen if this patch makes
  it fail more than it already is failing, but would not cause other
  failures or problems after getting an ipv6 address; this patch will
  affect only startup-time.

  [other info]

  related bug 1633479

  
  [original description]

  
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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

  

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2017-10-12 Thread Dan Streetman
** Changed in: isc-dhcp (Ubuntu Trusty)
 Assignee: (unassigned) => Dan Streetman (ddstreet)

** Changed in: isc-dhcp (Ubuntu Xenial)
 Assignee: (unassigned) => Dan Streetman (ddstreet)

** Changed in: isc-dhcp (Ubuntu Zesty)
 Assignee: (unassigned) => Dan Streetman (ddstreet)

** Changed in: isc-dhcp (Ubuntu Artful)
 Assignee: (unassigned) => Dan Streetman (ddstreet)

** Changed in: isc-dhcp (Ubuntu Artful)
   Importance: Undecided => Medium

** Changed in: isc-dhcp (Ubuntu Zesty)
   Importance: Undecided => Medium

** Changed in: isc-dhcp (Ubuntu Trusty)
   Importance: Undecided => Medium

** Changed in: isc-dhcp (Ubuntu Xenial)
   Importance: Undecided => Medium

** Changed in: isc-dhcp (Ubuntu Artful)
   Status: New => In Progress

** Changed in: isc-dhcp (Ubuntu Zesty)
   Status: New => In Progress

** Changed in: isc-dhcp (Ubuntu Xenial)
   Status: New => In Progress

** Changed in: isc-dhcp (Ubuntu Trusty)
   Status: New => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1718568

Title:
  dhclient-script fails to wait for link-local address

Status in isc-dhcp package in Ubuntu:
  In Progress
Status in isc-dhcp source package in Trusty:
  In Progress
Status in isc-dhcp source package in Xenial:
  In Progress
Status in isc-dhcp source package in Zesty:
  In Progress
Status in isc-dhcp source package in Artful:
  In Progress
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  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 "

  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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2017-10-12 Thread Eric Desrochers
** 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 Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
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  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 "

  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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2017-09-21 Thread Bug Watch Updater
** Changed in: isc-dhcp (Debian)
   Status: Unknown => New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
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 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  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 "

  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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2017-09-20 Thread Ubuntu Foundations Team Bug Bot
The attachment "Patch to detect no link-local address" 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

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
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 package in Debian:
  Unknown

Bug description:
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2017-09-20 Thread Jeff
Confirmed to resolve issue seen here.

I won't be concerned if you prefer alternate sh-script formatting over
mine.

** Patch added: "Patch to detect no link-local address"
   
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1718568/+attachment/4954114/+files/dhclient-script.diff

** Description changed:

  Summary:
  
  
  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "
  
  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
+ .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.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
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 package in Debian:
  Unknown

Bug description:
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

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

[Touch-packages] [Bug 1718568] Re: dhclient-script fails to wait for link-local address

2017-09-20 Thread Jeff
Confirmed that the same apparent flaw in dhclient-script appears to
exist in 4.3.3-5ubuntu12.7 under Ubuntu 16.04.3 LTS

This appears related to / caused by LP: #1633479
based on 
http://launchpadlibrarian.net/291516262/isc-dhcp_4.3.3-5ubuntu15_4.3.3-5ubuntu15.1.diff.gz


** Description changed:

  Summary:
  
  
  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "
  
  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.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
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 package in Debian:
  Unknown

Bug description:
  Summary:
  

  If a interface does not yet have a link-local address (as it may have
  just been brought up), dhclient -6  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 "

  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