All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Do not leave router anycast address for /127 prefixes.
@ 2011-07-24 21:44 yoshfuji
  2011-07-25 23:16 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: yoshfuji @ 2011-07-24 21:44 UTC (permalink / raw)
  To: netdev; +Cc: davem, YOSHIFUJI Hideaki, Bjørn Mork, Brian Haley

From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

Original commit 2bda8a0c8af... "Disable router anycast
address for /127 prefixes" says:

|   No need for matching code in addrconf_leave_anycast() as it
|   will silently ignore any attempt to leave an unknown anycast
|   address.

After analysis, because 1) we may add two or more prefixes on the
same interface, or 2)user may have manually joined that anycast,
we may hit chances to have anycast address which as if we had
generated one by /127 prefix and we should not leave from subnet-
router anycast address unconditionally.

CC: Bjørn Mork <bjorn@mork.no>
CC: Brian Haley <brian.haley@hp.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
---
 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 a06c53c..a55500c 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1481,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.0.4


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

* Re: [PATCH] Do not leave router anycast address for /127 prefixes.
  2011-07-24 21:44 [PATCH] Do not leave router anycast address for /127 prefixes yoshfuji
@ 2011-07-25 23:16 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-07-25 23:16 UTC (permalink / raw)
  To: yoshfuji; +Cc: netdev, bjorn, brian.haley

From: yoshfuji@linux-ipv6.org
Date: Mon, 25 Jul 2011 06:44:34 +0900

> From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> 
> Original commit 2bda8a0c8af... "Disable router anycast
> address for /127 prefixes" says:
> 
> |   No need for matching code in addrconf_leave_anycast() as it
> |   will silently ignore any attempt to leave an unknown anycast
> |   address.
> 
> After analysis, because 1) we may add two or more prefixes on the
> same interface, or 2)user may have manually joined that anycast,
> we may hit chances to have anycast address which as if we had
> generated one by /127 prefix and we should not leave from subnet-
> router anycast address unconditionally.
> 
> CC: Bjørn Mork <bjorn@mork.no>
> CC: Brian Haley <brian.haley@hp.com>
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>

Applied.

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

end of thread, other threads:[~2011-07-25 23:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-24 21:44 [PATCH] Do not leave router anycast address for /127 prefixes yoshfuji
2011-07-25 23:16 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.