Message ID | CAHPKR9J=niSHrGmeX7ZM-1fosjnRA_CFrfd+ha3zwNibNGe1bg@mail.gmail.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
From: Balakumaran Kannan <kumaran.4353@gmail.com> Date: Thu, 28 Mar 2013 20:44:36 +0530 > static void addrconf_add_linklocal(struct inet6_dev *idev, const > struct in6_addr *addr) Your email client corrupted this patch, please resubmit but only after you have emailed the patch to yourself and successfully applied the patch you receive in that test email. Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
>> static void addrconf_add_linklocal(struct inet6_dev *idev, const >> struct in6_addr *addr) > > Your email client corrupted this patch, please resubmit but only after > you have emailed the patch to yourself and successfully applied the > patch you receive in that test email. > > Thanks. I'll send working patch after verifying it. Thank you. K.Balakumaran -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- linux-3.9-rc4/net/ipv6/addrconf.c.orig 2013-03-27 10:40:26.382569527 +0530 +++ linux-3.9-rc4/net/ipv6/addrconf.c 2013-03-28 20:33:59.908228232 +0530 @@ -2529,6 +2529,9 @@ static void sit_add_v4_addrs(struct inet static void init_loopback(struct net_device *dev) { struct inet6_dev *idev; + struct net_device *sp_dev; + struct inet6_ifaddr *sp_ifa; + struct rt6_info *sp_rt; /* ::1 */ @@ -2540,6 +2543,31 @@ static void init_loopback(struct net_dev } add_addr(idev, &in6addr_loopback, 128, IFA_HOST); + + /* Add routes to other interface's IPv6 addresses */ + for_each_netdev(dev_net(dev), sp_dev) { + + if (!strcmp(sp_dev->name, dev->name)) + continue; + + idev = __in6_dev_get(sp_dev); + if (NULL == idev) + continue; + + read_lock_bh(&idev->lock); + list_for_each_entry(sp_ifa, &idev->addr_list, if_list) { + + if (sp_ifa->flags & (IFA_F_DADFAILED | IFA_F_TENTATIVE)) + continue; + + sp_rt = addrconf_dst_alloc(idev, &sp_ifa->addr, 0); + + /* Failure cases are ignored */ + if (!IS_ERR(sp_rt)) + ip6_ins_rt(sp_rt); + } + read_unlock_bh(&idev->lock); + } } static void addrconf_add_linklocal(struct inet6_dev *idev, const