aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/addrconf.h3
-rw-r--r--net/ipv6/addrconf.c4
-rw-r--r--net/ipv6/exthdrs.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 77f630f12806..8b1509bfc695 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -65,7 +65,8 @@ extern int ipv6_chk_addr(struct net *net,
65 int strict); 65 int strict);
66 66
67#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) 67#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
68extern int ipv6_chk_home_addr(struct in6_addr *addr); 68extern int ipv6_chk_home_addr(struct net *net,
69 struct in6_addr *addr);
69#endif 70#endif
70extern struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net, 71extern struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net,
71 struct in6_addr *addr, 72 struct in6_addr *addr,
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index c4df6cdff650..803caf1a3890 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2883,13 +2883,15 @@ void if6_proc_exit(void)
2883 2883
2884#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) 2884#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
2885/* Check if address is a home address configured on any interface. */ 2885/* Check if address is a home address configured on any interface. */
2886int ipv6_chk_home_addr(struct in6_addr *addr) 2886int ipv6_chk_home_addr(struct net *net, struct in6_addr *addr)
2887{ 2887{
2888 int ret = 0; 2888 int ret = 0;
2889 struct inet6_ifaddr * ifp; 2889 struct inet6_ifaddr * ifp;
2890 u8 hash = ipv6_addr_hash(addr); 2890 u8 hash = ipv6_addr_hash(addr);
2891 read_lock_bh(&addrconf_hash_lock); 2891 read_lock_bh(&addrconf_hash_lock);
2892 for (ifp = inet6_addr_lst[hash]; ifp; ifp = ifp->lst_next) { 2892 for (ifp = inet6_addr_lst[hash]; ifp; ifp = ifp->lst_next) {
2893 if (ifp->idev->dev->nd_net != net)
2894 continue;
2893 if (ipv6_addr_cmp(&ifp->addr, addr) == 0 && 2895 if (ipv6_addr_cmp(&ifp->addr, addr) == 0 &&
2894 (ifp->flags & IFA_F_HOMEADDRESS)) { 2896 (ifp->flags & IFA_F_HOMEADDRESS)) {
2895 ret = 1; 2897 ret = 1;
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 2df34ed276f1..3cd1c993d52b 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -445,7 +445,7 @@ looped_back:
445 kfree_skb(skb); 445 kfree_skb(skb);
446 return -1; 446 return -1;
447 } 447 }
448 if (!ipv6_chk_home_addr(addr)) { 448 if (!ipv6_chk_home_addr(&init_net, addr)) {
449 IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), 449 IP6_INC_STATS_BH(ip6_dst_idev(skb->dst),
450 IPSTATS_MIB_INADDRERRORS); 450 IPSTATS_MIB_INADDRERRORS);
451 kfree_skb(skb); 451 kfree_skb(skb);