dhcp: delay restarts after NAKs
authorBeniamino Galvani <bgalvani@redhat.com>
Wed, 27 Jan 2016 10:21:23 +0000 (11:21 +0100)
committerBeniamino Galvani <bgalvani@redhat.com>
Tue, 2 Feb 2016 14:23:34 +0000 (15:23 +0100)
commit1d1a3e0afb85478cda43670b8ed92a6db6c83f3e
tree97b240693fba36064c44c19b458031a3089f7beb
parentcd72d2044ad28b475bf84a38ba6db45292467dd8
dhcp: delay restarts after NAKs

The server might answer to a DHCPREQUEST with a NAK and currently the
client restarts the configuration process immediately.  It was
observed that this can easily generate loops in which the network is
flooded with DISCOVER,OFFER,REQUEST,NAK sequences.

RFC 2131 only states that "if the client receives a DHCPNAK message,
the client restarts the configuration process" without further
details.

Add a delay with exponential backoff between retries after NAKs to
limit the number of requests and cap the delay to 30 minutes.
src/libsystemd-network/sd-dhcp-client.c