From b26399283a9de0d9155ab36d8ee01e3564431c74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= Date: Thu, 31 Mar 2022 20:07:16 +0200 Subject: [PATCH] fff-ra: use dhcp leasetime for preferred and valid lifetime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When advertising network prefixes gathered from the interface, odhcpd sets the preferred and valid lifetime of those prefixes in the router advertisement to the values set for those addresses on the interface. When prefixes are configured statically (as done in our firmware), this means that odhcp announces these prefixes for SLAAC with infinite preferred and valid lifetimes. While this does not seem like a problem at first, it hurts significantly when configuration errors are made or cables are plugged into the wrong ports, because those addresses never vanish from devices anymore, as long as they are powered up. Also, it makes it impossible to change prefixes without gracefully shutting down the RA server, so it can announce zero lifetimes for previously announced prefixes. Sadly, odhcp does not have an option to configure these lifetimes explicitly, but it is possible to limit these lifetimes to the lease time configured and used for the DHCP functionality of odhcpd. Enable the appropriate 'ra_useleasetime' option to reduce impact of the before mentioned problems. Fixes: #142 Signed-off-by: Fabian Bläse Reviewed-by: Christian Dresel Reviewed-by: Robert Langhammer --- src/packages/fff/fff-ra/files/etc/uci-defaults/90-fff-ra | 1 + 1 file changed, 1 insertion(+) diff --git a/src/packages/fff/fff-ra/files/etc/uci-defaults/90-fff-ra b/src/packages/fff/fff-ra/files/etc/uci-defaults/90-fff-ra index ffbfc931..458dbe45 100644 --- a/src/packages/fff/fff-ra/files/etc/uci-defaults/90-fff-ra +++ b/src/packages/fff/fff-ra/files/etc/uci-defaults/90-fff-ra @@ -4,6 +4,7 @@ uci batch <