sd-dhcp-client: correct dhcpv4 renew/rebind retransmit timeouts
authorDan Streetman <ddstreet@canonical.com>
Tue, 8 Dec 2020 20:40:10 +0000 (15:40 -0500)
committerDan Streetman <ddstreet@canonical.com>
Mon, 14 Dec 2020 23:19:22 +0000 (18:19 -0500)
commitc24288d21ee94856f5c60473191d41c77b71da91
treefbd399db7c9ad00a294098be0ff384248dd76dac
parentb0d7d8063cb61bb204523f02fd45fb671a1f4d43
sd-dhcp-client: correct dhcpv4 renew/rebind retransmit timeouts

Use the request timeout algorithm specified in RFC2131 section 4.4.5 for
handling timed out RENEW and REBIND requests.

This changes behavior, as previously only 2 RENEW and 2 REBIND requests
were sent, no matter how long the lease lifetime. Now, requests are
send according to the RFC, which results in starting with a timeout
of 1/2 the t1 or t2 period, and halving the timeout for each retry
down to a minimum of 60 seconds.

Fixes: #17909
src/libsystemd-network/sd-dhcp-client.c