Skip to content

Commit

Permalink
wicked: reduce initial DHCPv6 solicitation delay to 100 ms
Browse files Browse the repository at this point in the history
Reduce the maximum initial solicitation delay to 100 ms from the
spec-mandated value of 1000 ms to reduce the average and variance in
time to node readiness.

This is not strictly compliant with RFC 3315 (treating the initial delay
as a MUST), and only tolerated by its successor RFC 8415 (changing it to
a SHOULD). This change therefore is not a good candidate for upstreaming.

Signed-off-by: Markus Boehme <[email protected]>
  • Loading branch information
markusboehme committed Jun 2, 2023
1 parent 53fe4ae commit 01a3274
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 5aa6eff182204b312007ac44dcfffdf4dc6b7428 Mon Sep 17 00:00:00 2001
From: Markus Boehme <[email protected]>
Date: Fri, 26 May 2023 16:21:11 +0200
Subject: [PATCH] dhcp6: reduce maximum initial solicitation delay to 100 ms

While RFC 3315 requires the initial solicitation delay to be randomly
chosen between 0 and 1000 ms to prevent a thundering herd of synchronized
clients during mass reboots, not all clients (e.g. systemd-networkd) follow
this. Reduce the maximum delay to 100 ms which, together with natural
jitter during boot, still seems plenty and cuts down the time to lease.

Note that the more recent RFC 8415 softened its stance a bit. The
initial solicitation delay "SHOULD" be followed, i.e. is recommended but
not required.

Signed-off-by: Markus Boehme <[email protected]>
---
src/dhcp6/protocol.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dhcp6/protocol.h b/src/dhcp6/protocol.h
index cd917ba..5f40902 100644
--- a/src/dhcp6/protocol.h
+++ b/src/dhcp6/protocol.h
@@ -119,7 +119,7 @@ enum NI_DHCP6_MSG_TYPE {
* Parameter Value Description
* ---------------------------------------------------------------------------
*/
-#define NI_DHCP6_SOL_MAX_DELAY 1000 /* Max delay of first Solicit */
+#define NI_DHCP6_SOL_MAX_DELAY 100 /* Max delay of first Solicit */
#define NI_DHCP6_SOL_TIMEOUT 1000 /* Initial Solicit timeout */
#define NI_DHCP6_SOL_MAX_RT 3600000 /* Max Solicit timeout value */
#define NI_DHCP6_REQ_TIMEOUT 1000 /* Initial Request timeout */
--
2.40.1

1 change: 1 addition & 0 deletions packages/wicked/wicked.spec
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Patch1004: 1004-adjust-safeguard-for-dhcp6-defer-timeout.patch
Patch1005: 1005-client-validate-ethernet-namespace-node.patch
Patch1006: 1006-server-discover-hardware-address-of-unconfigured-int.patch
Patch1007: 1007-dhpc6-don-t-cancel-transmission-if-random-delay-happ.patch
Patch1008: 1008-dhcp6-reduce-maximum-initial-solicitation-delay-to-1.patch

BuildRequires: %{_cross_os}glibc-devel
BuildRequires: %{_cross_os}libdbus-devel
Expand Down

0 comments on commit 01a3274

Please sign in to comment.