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

* Re: [9front] [PATCH] ip/ipconfig: don't add default routes for ipv6 prefixes with a validlt of 0
  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
  0 siblings, 1 reply; 3+ messages in thread
From: hiro @ 2024-06-11 11:23 UTC (permalink / raw)
  To: 9front

it might not be the fritz!box's fault:
against all sanity and against the working mechanism described in the
RFC, the ISPs invalidate old prefixes immediately after they give you
a new PPP session. sadly this is the most common scenario now for end
users. in this case it makes sense that the fritze sets the same 0
lifetime in RAs for the old prefixes.
tbh there's no other good reasons for prefixes changing continuously
like that anyways, apart from this ISP-generated sabotage edge-case.

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

* Re: [9front] [PATCH] ip/ipconfig: don't add default routes for ipv6 prefixes with a validlt of 0
  2024-06-11 11:23 ` hiro
@ 2024-06-11 11:41   ` Arne Meyer
  0 siblings, 0 replies; 3+ messages in thread
From: Arne Meyer @ 2024-06-11 11:41 UTC (permalink / raw)
  To: 9front

you're right, the fritzbox is not to blame. after sending my mail i found out there is rfc7084 which 
invalidates rfc6204 and then there is rfc9096 which annotates the former and describes this exact behavior.
so it is to be expected from newer cpe routers.

^ 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).