diff mbox

[v2] Disable router anycast address for /127 prefixes

Message ID 1309943053-21437-1-git-send-email-bjorn@mork.no
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Bjørn Mork July 6, 2011, 9:04 a.m. UTC
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@mork.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(-)

Comments

David Miller July 7, 2011, 11:15 a.m. UTC | #1
From: Bjørn Mork <bjorn@mork.no>
Date: Wed,  6 Jul 2011 11:04:13 +0200

> 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@mork.no>

Applied to net-next-2.6, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;