9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] [PATCH] ip/ipconfig: don't add default routes for ipv6 prefixes with a validlt of 0
@ 2024-06-10 16:09 Arne Meyer
  2024-06-11 11:23 ` hiro
  0 siblings, 1 reply; 3+ messages in thread
From: Arne Meyer @ 2024-06-10 16:09 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 439 bytes --]

Some cpe routers announce invalidated ipv6 prefixes with a preflt and validlt of 0
for some time after they get a new prefix. the default routes for these prefixes are
getting continually removed and added with every ra we receive, so just don't bother.

At least my fritzbox behaves that way. rfc 6204 states that in this case preflt should be 0
and validlt should be 2 hours or it's current value and then counting down. But here we are.

[-- Attachment #2: ipconfig.diff --]
[-- Type: application/octet-stream, Size: 823 bytes --]

From: Arne Meyer <meyer.arne83@netcologne.de>
Date: Mon, 10 Jun 2024 15:45:31 +0000
Subject: [PATCH] ip/ipconfig: don't add default routes for ipv6 prefixes with a validlt of 0


at least some cpe routers announce invalidated ipv6 prefixes with a preflt and validlt of 0
for some time after they get a new prefix. the default routes for these prefixes are
getting continually removed and added with every ra we receive, so just don't bother.
---
diff 0dc37f9794c63827005b67a39a8ad749e138eda9 822a065672ccb69fd4003c6f35cc462fe4765edf
--- a/sys/src/cmd/ip/ipconfig/ipv6.c
+++ b/sys/src/cmd/ip/ipconfig/ipv6.c
@@ -725,6 +725,7 @@
 		memmove(r->hash, hash, SHA1dlen);
 
 		if(conf.routerlt == 0
+		|| conf.validlt == 0
 		|| isula(conf.laddr)
 		|| ipcmp(conf.gaddr, conf.laddr) == 0
 		|| ipcmp(conf.gaddr, conf.lladdr) == 0)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-11 11:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-10 16:09 [9front] [PATCH] ip/ipconfig: don't add default routes for ipv6 prefixes with a validlt of 0 Arne Meyer
2024-06-11 11:23 ` hiro
2024-06-11 11:41   ` Arne Meyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).