From 66173db75b154e81f27b5e5e2ce67159b18aa819 Mon Sep 17 00:00:00 2001 From: juga0 Date: Thu, 3 Aug 2017 19:42:06 +0200 Subject: [PATCH] networkd: RFC7844, disable INIT-REBOOT state when Anonymize is true. --- src/libsystemd-network/sd-dhcp-client.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 11e66fa..8426f60 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -1821,7 +1821,14 @@ int sd_dhcp_client_start(sd_dhcp_client *client) { if (r < 0) return r; - if (client->last_addr) + /* RFC7844 section 3.3: + SHOULD perform a complete four-way handshake, starting with a + DHCPDISCOVER, to obtain a new address lease. If the client can + ascertain that this is exactly the same network to which it was + previously connected, and if the link-layer address did not change, + the client MAY issue a DHCPREQUEST to try to reclaim the current + address. */ + if (client->last_addr && !client->anonymize) client->state = DHCP_STATE_INIT_REBOOT; r = client_start(client); -- 2.7.4