Hello.

If net.ipv6.conf.default.forwarding is !0 when bringing up the interface,
we failed to join all routers multicast address, while we join/leave if we
enable/disable net.ipv6.conf.ethX.forwarding later.

This is inconsistent because we assume that we join all routers multicast
if and only if net.ipv6.conf.ethX.forwarding is !0.

So, make sure to join all routers multicast address if forwarding is enabled
on the interface.

Signed-off-by: YOSHIFUJI Hideaki <[EMAIL PROTECTED]>

diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 807c021..b584df6 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -2273,6 +2273,12 @@ void ipv6_mc_init_dev(struct inet6_dev *
        /* Add all-nodes address. */
        ipv6_addr_all_nodes(&maddr);
        ipv6_dev_mc_inc(idev->dev, &maddr);
+
+       if (idev->cnf.forwarding) {
+               /* Add all-routers address. */
+               ipv6_addr_all_routers(&maddr);
+               ipv6_dev_mc_inc(idev->dev, &maddr);
+       }
 }
 
 /*


-- 
YOSHIFUJI Hideaki @ USAGI Project  <[EMAIL PROTECTED]>
GPG-FP  : 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to