chiark / gitweb /
libsystemd-dhcp: Handle T1 Renewing timeout
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 20 Dec 2013 15:16:18 +0000 (17:16 +0200)
committerTom Gundersen <teg@jklm.no>
Sun, 22 Dec 2013 13:37:53 +0000 (14:37 +0100)
commitaba26854e5d47e36fd78a263b271d727d308f0dd
tree5a83ffdb84288deb7daaebb1cb9a9d2e6c276e76
parent234fc2dfce0e749f6e88301f2c82a3e54ccaa5fa
libsystemd-dhcp: Handle T1 Renewing timeout

Expiration of T1 timeout takes the client to the Rebinding state,
where it attempts to renew its lease. Start by opening a DCHP unicast
socket as there now is a proper IP address set.

Compute the resend timer as half of the remaining time down to a
minimum of 60 seconds (RFC2131). Modify DHCP Request sending to send
only UDP DHCP data when unicasting. Also modify DHCP Ack/Nak
receiving such that the client_receive_ack() takes care of using
either the full IP, UDP, DHCP packet or only the DHCP payload
depending whether the client is in Requesting or Renewing state.
Finally always report DHCP_EVENT_IP_ACQUIRE from Requesting state
and only DHCP_EVENT_IP_CHANGE if the IP address was modified when
the lease was renewed.
src/libsystemd-dhcp/dhcp-client.c