Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6ddef9e authored by Li Wei's avatar Li Wei Committed by David S. Miller
Browse files

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: default avatarLi Wei <lw@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 34efc283
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
}