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 32019e651c ("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 <fx.lebail@yahoo.com>
Cc: Thomas Haller <thaller@redhat.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
e5e97ee956
commit
88ad31491e
@@ -1671,7 +1671,7 @@ void addrconf_leave_solict(struct inet6_dev *idev, const struct in6_addr *addr)
|
|||||||
static void addrconf_join_anycast(struct inet6_ifaddr *ifp)
|
static void addrconf_join_anycast(struct inet6_ifaddr *ifp)
|
||||||
{
|
{
|
||||||
struct in6_addr addr;
|
struct in6_addr addr;
|
||||||
if (ifp->prefix_len == 127) /* RFC 6164 */
|
if (ifp->prefix_len >= 127) /* RFC 6164 */
|
||||||
return;
|
return;
|
||||||
ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
|
ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
|
||||||
if (ipv6_addr_any(&addr))
|
if (ipv6_addr_any(&addr))
|
||||||
@@ -1682,7 +1682,7 @@ static void addrconf_join_anycast(struct inet6_ifaddr *ifp)
|
|||||||
static void addrconf_leave_anycast(struct inet6_ifaddr *ifp)
|
static void addrconf_leave_anycast(struct inet6_ifaddr *ifp)
|
||||||
{
|
{
|
||||||
struct in6_addr addr;
|
struct in6_addr addr;
|
||||||
if (ifp->prefix_len == 127) /* RFC 6164 */
|
if (ifp->prefix_len >= 127) /* RFC 6164 */
|
||||||
return;
|
return;
|
||||||
ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
|
ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
|
||||||
if (ipv6_addr_any(&addr))
|
if (ipv6_addr_any(&addr))
|
||||||
|
|||||||
Reference in New Issue
Block a user