From 01a32749ee00ccfe3939350b8f5e85622bff3c8e Mon Sep 17 00:00:00 2001 From: Markus Boehme Date: Fri, 26 May 2023 16:44:39 +0200 Subject: [PATCH] wicked: reduce initial DHCPv6 solicitation delay to 100 ms 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 --- ...imum-initial-solicitation-delay-to-1.patch | 36 +++++++++++++++++++ packages/wicked/wicked.spec | 1 + 2 files changed, 37 insertions(+) create mode 100644 packages/wicked/1008-dhcp6-reduce-maximum-initial-solicitation-delay-to-1.patch diff --git a/packages/wicked/1008-dhcp6-reduce-maximum-initial-solicitation-delay-to-1.patch b/packages/wicked/1008-dhcp6-reduce-maximum-initial-solicitation-delay-to-1.patch new file mode 100644 index 00000000000..5246674ac34 --- /dev/null +++ b/packages/wicked/1008-dhcp6-reduce-maximum-initial-solicitation-delay-to-1.patch @@ -0,0 +1,36 @@ +From 5aa6eff182204b312007ac44dcfffdf4dc6b7428 Mon Sep 17 00:00:00 2001 +From: Markus Boehme +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 +--- + 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 + diff --git a/packages/wicked/wicked.spec b/packages/wicked/wicked.spec index ea82322de2b..0874990e63d 100644 --- a/packages/wicked/wicked.spec +++ b/packages/wicked/wicked.spec @@ -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