From 7332c7343d5437956259de57b54a8dc8cf4926e0 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 26 Jun 2019 22:00:34 +0200 Subject: dhcp: nettools: decrease initial delay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I think that artificially slowing down DHCP is not going to make users happier, so let's decrease it to the minimum allowed value (1 ms). Note that also dhclient and the internal client have it disabled. From the dhclient.conf man page: *initial-delay* parameter sets the maximum time client can wait after start before commencing first transmission. According to RFC2131 Section 4.4.1, client should wait a random time between startup and the actual first transā€ mission. Previous versions of ISC DHCP client used to wait random time up to 5 seconds, but that was unwanted due to impact on startup time. As such, new versions have the default initial delay set to 0. To restore old behavior, please set initial-delay to 5. --- src/dhcp/nm-dhcp-nettools.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dhcp/nm-dhcp-nettools.c b/src/dhcp/nm-dhcp-nettools.c index 693c4955b5..bede788dbd 100644 --- a/src/dhcp/nm-dhcp-nettools.c +++ b/src/dhcp/nm-dhcp-nettools.c @@ -1235,10 +1235,10 @@ ip4_start (NMDhcpClient *client, } /* - * XXX + * FIXME: * Select, or configure, a reasonable start delay, to protect poor servers beeing flooded. */ - n_dhcp4_client_probe_config_set_start_delay (config, 500); + n_dhcp4_client_probe_config_set_start_delay (config, 1); if (last_ip4_address) { inet_pton (AF_INET, last_ip4_address, &last_addr); -- cgit v1.2.1