Skip to content

Commit

Permalink
IPv6: Fix not join all-router mcast group when forwarding set.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Li Wei authored and davem330 committed Mar 6, 2012
1 parent 34efc28 commit d6ddef9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d6ddef9

Please sign in to comment.