Package: isc-dhcp-client
Version: 4.4.1-2.1+b2
Severity: normal

Dear Maintainer,

I believe I have found the exact bug anticipated by Sven Ulland in his
fix for #834532.  Here is a quote from his report:

> A problem remains: If dhclient is terminated and started again, it starts with
> reason=REBOOT and attempts to do a 'ip -4 addr add ...'. Since the address is
> still configured on the interface, this results in 'RTNETLINK answers: File
> exists', and the lifetimes are not reset. If the lifetimes expire before the
> DHCP renew hits, the address(es) are removed from the interface. This should
> probably be fixed in a separate issue.

Just to expand on Sven's description with my actual symptoms...  I have a
script which can restart dhclient rather abruptly (killall -9 dhclient;
dhclient wlan0).  Sometimes the IP address remains on the interface, and
then after dhclient restarts the valid_lft is not reset.  Then the kernel
kills the IP address after the lifetime runs out, but dhclient isn't
ready to renew the interface yet.  The connection is then dead until
dhclient renews on its own schedule (or it is manually restarted).

To work around it on my system, I simply found the two commands that set
valid_lft and replaced "ip -4 addr add" with "ip -4 addr replace".

I think this fix should be generally applicable.  Here's the trivial
patch:

http://galexander.org/x/0001-replace-IPv4-lifetime-instead-of-add-in-case-it-alre.patch

Hope this helps!  Thanks!

- Greg


-- System Information:
Distributor ID: Debian
Description:    Devuan GNU/Linux 3 (beowulf)
Release:        3
Codename:       beowulf
Architecture: x86_64

Kernel: Linux 4.19.0-11-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages isc-dhcp-client depends on:
ii  debianutils        4.8.6.1
ii  iproute2           4.20.0-2
ii  libc6              2.31-4
ii  libdns-export1110  1:9.11.19+dfsg-1
ii  libisc-export1105  1:9.11.19+dfsg-1

Versions of packages isc-dhcp-client recommends:
ii  isc-dhcp-common  4.4.1-2

Versions of packages isc-dhcp-client suggests:
pn  avahi-autoipd         <none>
pn  isc-dhcp-client-ddns  <none>
ii  resolvconf            1.84

-- Configuration Files:
/etc/dhcp/dhclient.conf changed [not included]

-- no debconf information

Reply via email to