aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-01-15 00:48:40 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-01-23 23:25:40 -0500
commitd88ae4cc97b24783ee4480697fbdcc02ab4133a6 (patch)
tree123c6bdd2a361f2b93a28b432939a1dce774f3f4 /net/ipv6/addrconf.c
parente0e8f1c8220c43bdf25cfb5622f6ab6947027fb1 (diff)
[IPV6] MCAST: Fix joining all-node multicast group on device initialization.
Join all-node multicast group after assignment of dev->ip6_ptr because it must be assigned when ipv6_dev_mc_inc() is called. This fixes Bug#7817, reported by <gernoth@informatik.uni-erlangen.de>. Closes: 7817 Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 171e5b55d7d6..2a7e4618f526 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -341,6 +341,7 @@ void in6_dev_finish_destroy(struct inet6_dev *idev)
341static struct inet6_dev * ipv6_add_dev(struct net_device *dev) 341static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
342{ 342{
343 struct inet6_dev *ndev; 343 struct inet6_dev *ndev;
344 struct in6_addr maddr;
344 345
345 ASSERT_RTNL(); 346 ASSERT_RTNL();
346 347
@@ -425,6 +426,11 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
425#endif 426#endif
426 /* protected by rtnl_lock */ 427 /* protected by rtnl_lock */
427 rcu_assign_pointer(dev->ip6_ptr, ndev); 428 rcu_assign_pointer(dev->ip6_ptr, ndev);
429
430 /* Join all-node multicast group */
431 ipv6_addr_all_nodes(&maddr);
432 ipv6_dev_mc_inc(dev, &maddr);
433
428 return ndev; 434 return ndev;
429} 435}
430 436