aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index d7b440343e97..f35c3df410df 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1206,13 +1206,16 @@ static int ipv6_count_addresses(struct inet6_dev *idev)
1206 return cnt; 1206 return cnt;
1207} 1207}
1208 1208
1209int ipv6_chk_addr(struct in6_addr *addr, struct net_device *dev, int strict) 1209int ipv6_chk_addr(struct net *net, struct in6_addr *addr,
1210 struct net_device *dev, int strict)
1210{ 1211{
1211 struct inet6_ifaddr * ifp; 1212 struct inet6_ifaddr * ifp;
1212 u8 hash = ipv6_addr_hash(addr); 1213 u8 hash = ipv6_addr_hash(addr);
1213 1214
1214 read_lock_bh(&addrconf_hash_lock); 1215 read_lock_bh(&addrconf_hash_lock);
1215 for(ifp = inet6_addr_lst[hash]; ifp; ifp=ifp->lst_next) { 1216 for(ifp = inet6_addr_lst[hash]; ifp; ifp=ifp->lst_next) {
1217 if (ifp->idev->dev->nd_net != net)
1218 continue;
1216 if (ipv6_addr_equal(&ifp->addr, addr) && 1219 if (ipv6_addr_equal(&ifp->addr, addr) &&
1217 !(ifp->flags&IFA_F_TENTATIVE)) { 1220 !(ifp->flags&IFA_F_TENTATIVE)) {
1218 if (dev == NULL || ifp->idev->dev == dev || 1221 if (dev == NULL || ifp->idev->dev == dev ||
@@ -1223,7 +1226,6 @@ int ipv6_chk_addr(struct in6_addr *addr, struct net_device *dev, int strict)
1223 read_unlock_bh(&addrconf_hash_lock); 1226 read_unlock_bh(&addrconf_hash_lock);
1224 return ifp != NULL; 1227 return ifp != NULL;
1225} 1228}
1226
1227EXPORT_SYMBOL(ipv6_chk_addr); 1229EXPORT_SYMBOL(ipv6_chk_addr);
1228 1230
1229static 1231static