NetworkManager/src/dhcp-manager
Dan Williams 90a77565d4 dhcp: treat lease expiry as failure (rh #1139326)
Lease expiry means that the DHCP configuration is no longer valid, and
that all attempts to renew/rebind the lease have failed.  The IP config
needs to be removed.  NetworkManager also sets prefered/valid lifetimes
on addresses, so the kernel will remove them when the lease expires
anyway.  That causes removal of the default route, if the default route
was through the device whose config has now expired.

DHCP clients will typically move to the 'renew' or 'rebind' states when
nearing lease expiry, then if no answer is received move to the 'expire'
state.  Eventually they move to the 'fail' state when all attempts to
contact the server have failed.

Previously, since NM ignored the 'expire' DHCP state it would not clear
out the DHCP IP4 config immediately when the lease expired, instead
waiting for the DHCP client to move to the 'fail' state.  But if the
DHCP server appeared between the 'expire' and 'fail' states, NM would
not notice and the device's NMIP4Config would not change, and thus the
Policy would not get the "ip4-config-changed" signal to re-add the
default route that the kernel had previously removed due to the valid
lifetime reaching zero when the lease expired.

https://bugzilla.redhat.com/show_bug.cgi?id=1139326
2014-10-02 15:02:44 -05:00
..
tests libnm-core: change all mac-address properties to G_TYPE_STRING 2014-09-04 09:20:10 -04:00
Makefile.am dhcp-manager: port nm-dhcp-helper from dbus-glib to gdbus 2014-09-04 18:19:21 -04:00
nm-dhcp-client.c dhcp: treat lease expiry as failure (rh #1139326) 2014-10-02 15:02:44 -05:00
nm-dhcp-client.h libnm-core: change all mac-address properties to G_TYPE_STRING 2014-09-04 09:20:10 -04:00
nm-dhcp-dhclient-utils.c libnm-core: change all mac-address properties to G_TYPE_STRING 2014-09-04 09:20:10 -04:00
nm-dhcp-dhclient-utils.h libnm-core: change all mac-address properties to G_TYPE_STRING 2014-09-04 09:20:10 -04:00
nm-dhcp-dhclient.c dhcp: fix dhclient abnormal exit due to SIGPIPE (bgo #735962) 2014-09-12 12:49:16 +02:00
nm-dhcp-dhclient.h core: consolidate helper progam searching (bgo #734131) 2014-09-11 12:11:56 -05:00
nm-dhcp-dhcpcd.c dhcp: fix dhclient abnormal exit due to SIGPIPE (bgo #735962) 2014-09-12 12:49:16 +02:00
nm-dhcp-dhcpcd.h core: consolidate helper progam searching (bgo #734131) 2014-09-11 12:11:56 -05:00
nm-dhcp-helper.c dhcp: fix g_error_free() called with a bad argument 2014-09-05 10:25:03 +02:00
nm-dhcp-helper.conf dhcp: use private socket to return status if available 2013-04-08 11:30:31 -05:00
nm-dhcp-manager.c core: consolidate helper progam searching (bgo #734131) 2014-09-11 12:11:56 -05:00
nm-dhcp-manager.h libnm-core: change all mac-address properties to G_TYPE_STRING 2014-09-04 09:20:10 -04:00
nm-dhcp-utils.c core: fill in nm-types.h, clean out other headers 2014-07-23 10:56:26 -04:00
nm-dhcp-utils.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00