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.
This commit is contained in:
Beniamino Galvani
2025-04-14 22:37:26 +02:00
committed by Yu Watanabe
parent c2691d8e7c
commit 2451cd2512
3 changed files with 9 additions and 2 deletions

7
NEWS
View File

@@ -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.
— <place>, <date>
CHANGES WITH 257:

View File

@@ -996,7 +996,7 @@ DuplicateAddressDetection=none</programlisting></para>
<listitem>
<para>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.</para>
time between 57% (4/7) and 100% of the given value. If unset, defaults to 200 milliseconds.</para>
<xi:include href="version-info.xml" xpointer="v258"/>
</listitem>

View File

@@ -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,