[pkg-dhcp-devel] Bug#834532: isc-dhcp-client: does not maintain IPv4 address lifetimes

Sven Ulland sveniu at ifi.uio.no
Tue Aug 16 18:45:23 UTC 2016


Package: isc-dhcp-client
Version: 4.3.1-6+deb8u2
Severity: normal
Tags: patch

When using the initrd system 'dracut', its built-in dhclient-script.sh sets
IPv4 address lifetimes using the 'ip addr ... valid_lft n preferred_lft n'
syntax [2].

The Debian dhclient-script.linux does not maintain IPv4 address lifetimes, so
the dracut-assigned lifetimes eventually expire, and the address(es) are
unexpectedly removed from the interfaces.

Fedora/RedHat/CentOS's dhclient-script does maintain lifetimes [2], added in
[3] and [4].

The attached patch ports the above IPv4 changes from Fedora's solution, to
Debian's dhclient-script. It applies to the current master of [5].

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.

[1]: Bug 1058519 - Should set address lifetimes in dhclient-script.sh
https://bugzilla.redhat.com/show_bug.cgi?id=1058519

[2]: Bug 1032809 - dhclient-script: set address lifetimes
https://bugzilla.redhat.com/show_bug.cgi?id=1032809

[3]: dhclient-script: set address lifetimes (#1032809)
https://github.com/vaijab/fedora-dhcp/commit/e3ee5b17e9ffb46b1476ef97f532d6b81f2615dc

[4]: update address lifetimes on RENEW/RENEW6 (#1032809)
https://github.com/vaijab/fedora-dhcp/commit/543c1a58140be99fcd528a505ccdee7f4aaec535

[5]: git://anonscm.debian.org/pkg-dhcp/isc-dhcp.git
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-dhclient-script.linux-Set-IPv4-address-lifetime.patch
Type: text/x-diff
Size: 2423 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-dhcp-devel/attachments/20160816/00ac81f0/attachment.patch>


More information about the pkg-dhcp-devel mailing list