[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1309943053-21437-1-git-send-email-bjorn@mork.no>
Date: Wed, 6 Jul 2011 11:04:13 +0200
From: Bjørn Mork <bjorn@...k.no>
To: netdev@...r.kernel.org
Cc: Stephen Hemminger <shemminger@...tta.com>,
Herbert Xu <herbert@...dor.hengli.com.au>,
Brian Haley <brian.haley@...com>,
Bjørn Mork <bjorn@...k.no>
Subject: [PATCH v2] Disable router anycast address for /127 prefixes
RFC 6164 requires that routers MUST disable Subnet-Router anycast
for the prefix when /127 prefixes are used.
No need for matching code in addrconf_leave_anycast() as it
will silently ignore any attempt to leave an unknown anycast
address.
Signed-off-by: Bjørn Mork <bjorn@...k.no>
---
Changes since v1:
* removed unneeded change based on review comments from Brian Haley
Thought a bit more about this and found that adding less code
makes more sense, given that the meaning is clear enough. But I
really don't have any strong meanings about this. Please apply either
version 1 or version 2 depending on your preferences.
Bjørn
net/ipv6/addrconf.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 498b927..fef2e2e 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;
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists