From: Beniamino Galvani Date: Mon, 14 Apr 2025 20:37:26 +0000 (+0200) Subject: networkd: reduce the IPv4 DAD timeout to 200ms X-Git-Tag: v258-rc1~735^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2451cd2512fd3d267d4b906d71cd675d6e903a2e;p=thirdparty%2Fsystemd.git networkd: reduce the IPv4 DAD timeout to 200ms The original timeout of 7 seconds is very long for today's networks. Reduce it to 200ms. Note that this change also affects IPv4 link-local addressing. --- diff --git a/NEWS b/NEWS index af63649a166..147e5511a21 100644 --- a/NEWS +++ b/NEWS @@ -109,6 +109,13 @@ CHANGES WITH 258 in spe: * The meson option 'integration-tests' has been deprecated, and will be removed in a future release. + systemd-networkd and networkctl: + + * systemd-networkd now supports configuring the timeout for IPv4 + Duplicate Address Detection via a new setting + IPv4DuplicateAddressDetectionTimeoutSec=. The default timeout value + has been changed from 7 seconds to 200 milliseconds. + — , CHANGES WITH 257: diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 433ec4bb0da..98df365f1b7 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -996,7 +996,7 @@ DuplicateAddressDetection=none Configures the maximum timeout for IPv4 Duplicate Address Detection (RFC 5227). Must be a value between 1 millisecond and 60 seconds. If set, Duplicate Address Detection takes a randomized - time between 57% (4/7) and 100% of the given value. If unset, defaults to 7 seconds. + time between 57% (4/7) and 100% of the given value. If unset, defaults to 200 milliseconds. diff --git a/src/libsystemd-network/sd-ipv4acd.c b/src/libsystemd-network/sd-ipv4acd.c index 82d5fa75689..17db4a53f71 100644 --- a/src/libsystemd-network/sd-ipv4acd.c +++ b/src/libsystemd-network/sd-ipv4acd.c @@ -43,7 +43,7 @@ #define MAX_CONFLICTS 10U /* Default timeout from the RFC */ -#define DEFAULT_ACD_TIMEOUT_USEC (7 * USEC_PER_SEC) +#define DEFAULT_ACD_TIMEOUT_USEC (200 * USEC_PER_MSEC) typedef enum IPv4ACDState { IPV4ACD_STATE_INIT,