Skip to contentSkip to conversation

ipv6: don't install anycast address for /128 addresses on routers

PATCH Applied Hannes Frederic Sowa 3 participants 3 messages Jan 6, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipv6: don't install anycast address for /128 addresses on routers

It does not make sense to create an anycast address for an /128-prefix. Suppress it.

As 32019e651c6fce ("ipv6: Do not leave router anycast address for /127 prefixes.") shows we also may not leave them, because we could accidentally remove an anycast address the user has allocated or got added via another prefix.

Cc François-Xavier Le Bail <[email protected]>
Cc Thomas Haller <[email protected]>
Cc Jiri Pirko <[email protected]>
---
 net/ipv6/addrconf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/ipv6/addrconf.c +2 -2
index 6c16345..43c8220 100644
@@ -1677,7 +1677,7 @@ 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 */
+	if (ifp->prefix_len >= 127) /* RFC 6164 */
 		return;
 	ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
 	if (ipv6_addr_any(&addr))
@@ -1688,7 +1688,7 @@ 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 */
+	if (ifp->prefix_len >= 127) /* RFC 6164 */
 		return;
 	ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
 	if (ipv6_addr_any(&addr))
Signature · 1 line
1.8.4.2
#1 lore raw
Quoted 2 lines · Hannes Frederic Sowa

It does not make sense to create an anycast address for an /128-prefix. Suppress it.

Exact !

BR,
François-Xavier

maintainer Applied
#2 lore raw
In reply to Hannes Frederic Sowa

From: Hannes Frederic Sowa <[email protected]>
Date: Mon, 6 Jan 2014 17:53:14 +0100

Quoted 8 lines

It does not make sense to create an anycast address for an /128-prefix. Suppress it.

As 32019e651c6fce ("ipv6: Do not leave router anycast address for /127 prefixes.") shows we also may not leave them, because we could accidentally remove an anycast address the user has allocated or got added via another prefix.

Quoted 4 lines
Cc François-Xavier Le Bail <[email protected]>
Cc Thomas Haller <[email protected]>
Cc Jiri Pirko <[email protected]>

Applied, thank you.