From: Paul Donald Date: Fri, 3 Oct 2025 14:33:49 +0000 (+0200) Subject: router: Apply updated values from RFC9096 (updates RFC4861) to RA/ND X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=dc03e02d973ed2f6f4efdd67d6795dd30a88a164;p=project%2Fodhcpd.git router: Apply updated values from RFC9096 (updates RFC4861) to RA/ND 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 --- 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)