9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Arne Meyer <meyer.arne83@netcologne.de>
To: "9front@9front.org" <9front@9front.org>
Subject: [9front] [PATCH] ip/ipconfig: don't add default routes for ipv6 prefixes with a validlt of 0
Date: Mon, 10 Jun 2024 18:09:45 +0200 (CEST)	[thread overview]
Message-ID: <100769261.2962249.1718035785390@comcenter.netcologne.de> (raw)

[-- 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)

             reply	other threads:[~2024-06-10 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-10 16:09 Arne Meyer [this message]
2024-06-11 11:23 ` hiro
2024-06-11 11:41   ` Arne Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=100769261.2962249.1718035785390@comcenter.netcologne.de \
    --to=meyer.arne83@netcologne.de \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).