From: "Bjørn Mork" <bjorn@mork.no>
To: netdev@vger.kernel.org
Cc: "Stephen Hemminger" <shemminger@vyatta.com>,
"Herbert Xu" <herbert@gondor.hengli.com.au>,
"Bjørn Mork" <bjorn@mork.no>
Subject: [PATCH] Disable router anycast address for /127 prefixes
Date: Fri, 1 Jul 2011 13:22:10 +0200 [thread overview]
Message-ID: <1309519330-16649-1-git-send-email-bjorn@mork.no> (raw)
In-Reply-To: <20110630104713.52e085dd@nehalam.ftrdhcpuser.net>
RFC 6164 requires that routers MUST disable Subnet-Router anycast
for the prefix when /127 prefixes are used.
Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
How about something like this?
net/ipv6/addrconf.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 498b927..179c0f4 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1470,6 +1470,8 @@ void addrconf_leave_solict(struct inet6_dev *idev, const struct in6_addr *addr)
static void addrconf_join_anycast(struct inet6_ifaddr *ifp)
{
struct in6_addr addr;
+ if (ifp->prefix_len == 127) /* RFC 6164 */
+ return;
ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
if (ipv6_addr_any(&addr))
return;
@@ -1479,6 +1481,8 @@ static void addrconf_join_anycast(struct inet6_ifaddr *ifp)
static void addrconf_leave_anycast(struct inet6_ifaddr *ifp)
{
struct in6_addr addr;
+ if (ifp->prefix_len == 127) /* RFC 6164 */
+ return;
ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
if (ipv6_addr_any(&addr))
return;
--
1.7.2.5
next prev parent reply other threads:[~2011-07-01 11:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-30 17:47 IPv6 /127 address Stephen Hemminger
2011-07-01 11:22 ` Bjørn Mork [this message]
2011-07-01 14:45 ` [PATCH] Disable router anycast address for /127 prefixes Brian Haley
2011-07-01 18:26 ` Bjørn Mork
2011-07-01 19:09 ` Brian Haley
2011-07-02 9:38 ` Bjørn Mork
2011-07-06 9:04 ` [PATCH v2] " Bjørn Mork
2011-07-07 11:15 ` David Miller
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=1309519330-16649-1-git-send-email-bjorn@mork.no \
--to=bjorn@mork.no \
--cc=herbert@gondor.hengli.com.au \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/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).