From dc03e02d973ed2f6f4efdd67d6795dd30a88a164 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Fri, 3 Oct 2025 16:33:49 +0200 Subject: [PATCH] router: Apply updated values from RFC9096 (updates RFC4861) to RA/ND MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit https://datatracker.ietf.org/doc/html/rfc9096#section-3.4 Signed-off-by: Paul Donald Link: https://github.com/openwrt/odhcpd/pull/225 Signed-off-by: Álvaro Fernández Rojas --- src/router.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/router.h b/src/router.h index 19b0079..6609f43 100644 --- a/src/router.h +++ b/src/router.h @@ -54,7 +54,18 @@ struct icmpv6_opt { Note: this is 16 bit Router Lifetime field in RA packets */ -#define RouterLifetime 65535 +/* RFC9096 defines recommended option lifetimes configuration values + ND_PREFERRED_LIMIT 2700 + ND_VALID_LIMIT 5400 + + RFC9096 §3.4 + CE routers SHOULD set the "Router Lifetime" of Router Advertisement + (RA) messages to ND_PREFERRED_LIMIT. + + Note: while the RFC recommends SHOULD of ND_PREFERRED_LIMIT, this + define is used to cap values to a sane ceiling, i.e. ND_VALID_LIMIT. +*/ +#define RouterLifetime 5400 #define ND_RA_FLAG_PROXY 0x4 #define ND_RA_PREF_HIGH (1 << 3) -- 2.30.2