summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2019-06-26 22:00:34 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2019-07-04 10:56:48 +0200
commit5fbb22ee5bf4a013f06a473d4b38ca501ddea310 (patch)
treeb462a0c7ca1fc9239538ebc20d97f076de902c9c
parentd2906a5b8ec30ba316b592682c98d9cf6bfb158b (diff)
downloadNetworkManager-5fbb22ee5bf4a013f06a473d4b38ca501ddea310.tar.gz
dhcp: nettools: decrease initial delay
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.
-rw-r--r--src/dhcp/nm-dhcp-nettools.c4
1 files 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);