]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: reduce the IPv4 DAD timeout to 200ms 37138/head
authorBeniamino Galvani <b.galvani@gmail.com>
Mon, 14 Apr 2025 20:37:26 +0000 (22:37 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 26 Apr 2025 05:44:52 +0000 (14:44 +0900)
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.

NEWS
man/systemd.network.xml
src/libsystemd-network/sd-ipv4acd.c

diff --git a/NEWS b/NEWS
index af63649a166d3226402c55f7e068641fe0e3072e..147e5511a218d36dca37dc13c8902f6f0efef6ad 100644 (file)
--- 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.
+
         — <place>, <date>
 
 CHANGES WITH 257:
index 433ec4bb0dafb0d18aca86004bbe4a63a7669e69..98df365f1b723fb5caeac9a9100f7838d5d3e24b 100644 (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 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>
index 82d5fa75689b0365054c54e94c1de209b28064e6..17db4a53f71fa7b8f1d046ae7fcc7456d4b66cbc 100644 (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,