From: Li Wei Date: Mon, 5 Mar 2012 14:45:17 +0000 (+0000) Subject: IPv6: Fix not join all-router mcast group when forwarding set. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d6ddef9e641d1229d4ec841dc75ae703171c3e92;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git IPv6: Fix not join all-router mcast group when forwarding set. When forwarding was set and a new net device is register, we need add this device to the all-router mcast group. Signed-off-by: Li Wei Signed-off-by: David S. Miller --- diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index c02280a4d12..6b8ebc5da0e 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -434,6 +434,10 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev) /* Join all-node multicast group */ ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes); + /* Join all-router multicast group if forwarding is set */ + if (ndev->cnf.forwarding && dev && (dev->flags & IFF_MULTICAST)) + ipv6_dev_mc_inc(dev, &in6addr_linklocal_allrouters); + return ndev; }