aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-04-03 01:31:54 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-03 01:31:54 -0400
commitd66248326410ed0d3e813ebe974b3e6638df0717 (patch)
treea1dbe86f5540596a70c6f3b9aab051d37f37daf5 /net/ipv6/addrconf.c
parent8facd5fb73c6e960555e5913743dfbb6c3d984a5 (diff)
parentda241efcd9c3da2af6ba20055c7e158ec725005c (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull net into net-next to get the synchronize_net() bug fix in bonding. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index d6279cb3d547..a33b157d9ccf 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2616,6 +2616,9 @@ static void sit_add_v4_addrs(struct inet6_dev *idev)
2616static void init_loopback(struct net_device *dev) 2616static void init_loopback(struct net_device *dev)
2617{ 2617{
2618 struct inet6_dev *idev; 2618 struct inet6_dev *idev;
2619 struct net_device *sp_dev;
2620 struct inet6_ifaddr *sp_ifa;
2621 struct rt6_info *sp_rt;
2619 2622
2620 /* ::1 */ 2623 /* ::1 */
2621 2624
@@ -2627,6 +2630,30 @@ static void init_loopback(struct net_device *dev)
2627 } 2630 }
2628 2631
2629 add_addr(idev, &in6addr_loopback, 128, IFA_HOST); 2632 add_addr(idev, &in6addr_loopback, 128, IFA_HOST);
2633
2634 /* Add routes to other interface's IPv6 addresses */
2635 for_each_netdev(dev_net(dev), sp_dev) {
2636 if (!strcmp(sp_dev->name, dev->name))
2637 continue;
2638
2639 idev = __in6_dev_get(sp_dev);
2640 if (!idev)
2641 continue;
2642
2643 read_lock_bh(&idev->lock);
2644 list_for_each_entry(sp_ifa, &idev->addr_list, if_list) {
2645
2646 if (sp_ifa->flags & (IFA_F_DADFAILED | IFA_F_TENTATIVE))
2647 continue;
2648
2649 sp_rt = addrconf_dst_alloc(idev, &sp_ifa->addr, 0);
2650
2651 /* Failure cases are ignored */
2652 if (!IS_ERR(sp_rt))
2653 ip6_ins_rt(sp_rt);
2654 }
2655 read_unlock_bh(&idev->lock);
2656 }
2630} 2657}
2631 2658
2632static void addrconf_add_linklocal(struct inet6_dev *idev, const struct in6_addr *addr) 2659static void addrconf_add_linklocal(struct inet6_dev *idev, const struct in6_addr *addr)