aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/addrconf.h
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-09-24 01:52:47 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-24 01:52:47 -0400
commit23930fa1cebfea6f79881c588ccd1b0781e49e3f (patch)
tree36d29e3f83661c4f5f45b6f74ac0d5f9886867a8 /include/net/addrconf.h
parent36b35a5be0e4b406acd816e2122d153e875105be (diff)
parent4f5537de7c1531398e84e18a24f667e49cc94208 (diff)
Merge branch 'master' into upstream
Diffstat (limited to 'include/net/addrconf.h')
-rw-r--r--include/net/addrconf.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 3d71251b3eca..44f1b673f916 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -61,6 +61,9 @@ extern int addrconf_set_dstaddr(void __user *arg);
61extern int ipv6_chk_addr(struct in6_addr *addr, 61extern int ipv6_chk_addr(struct in6_addr *addr,
62 struct net_device *dev, 62 struct net_device *dev,
63 int strict); 63 int strict);
64#ifdef CONFIG_IPV6_MIP6
65extern int ipv6_chk_home_addr(struct in6_addr *addr);
66#endif
64extern struct inet6_ifaddr * ipv6_get_ifaddr(struct in6_addr *addr, 67extern struct inet6_ifaddr * ipv6_get_ifaddr(struct in6_addr *addr,
65 struct net_device *dev, 68 struct net_device *dev,
66 int strict); 69 int strict);
@@ -126,20 +129,18 @@ extern int unregister_inet6addr_notifier(struct notifier_block *nb);
126static inline struct inet6_dev * 129static inline struct inet6_dev *
127__in6_dev_get(struct net_device *dev) 130__in6_dev_get(struct net_device *dev)
128{ 131{
129 return (struct inet6_dev *)dev->ip6_ptr; 132 return rcu_dereference(dev->ip6_ptr);
130} 133}
131 134
132extern rwlock_t addrconf_lock;
133
134static inline struct inet6_dev * 135static inline struct inet6_dev *
135in6_dev_get(struct net_device *dev) 136in6_dev_get(struct net_device *dev)
136{ 137{
137 struct inet6_dev *idev = NULL; 138 struct inet6_dev *idev = NULL;
138 read_lock(&addrconf_lock); 139 rcu_read_lock();
139 idev = dev->ip6_ptr; 140 idev = __in6_dev_get(dev);
140 if (idev) 141 if (idev)
141 atomic_inc(&idev->refcnt); 142 atomic_inc(&idev->refcnt);
142 read_unlock(&addrconf_lock); 143 rcu_read_unlock();
143 return idev; 144 return idev;
144} 145}
145 146