]> Git Repo - linux.git/commitdiff
ipv6: Do not leave router anycast address for /127 prefixes.
authorYOSHIFUJI Hideaki <[email protected]>
Sun, 24 Jul 2011 11:44:34 +0000 (11:44 +0000)
committerDavid S. Miller <[email protected]>
Mon, 25 Jul 2011 23:16:00 +0000 (16:16 -0700)
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 <[email protected]>
CC: Brian Haley <[email protected]>
Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/ipv6/addrconf.c

index a06c53c14d841e07083ca9dbab9423bf607d914d..a55500cc0b29ab710e012d42f0862a95f4750669 100644 (file)
@@ -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;
This page took 0.064422 seconds and 4 git commands to generate.