diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-23 14:47:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-23 14:47:02 -0400 |
commit | 5f05647dd81c11a6a165ccc8f0c1370b16f3bcb0 (patch) | |
tree | 7851ef1c93aa1aba7ef327ca4b75fd35e6d10f29 /include/linux/inetdevice.h | |
parent | 02f36038c568111ad4fc433f6fa760ff5e38fab4 (diff) | |
parent | ec37a48d1d16c30b655ac5280209edf52a6775d4 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits)
bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL.
vlan: Calling vlan_hwaccel_do_receive() is always valid.
tproxy: use the interface primary IP address as a default value for --on-ip
tproxy: added IPv6 support to the socket match
cxgb3: function namespace cleanup
tproxy: added IPv6 support to the TPROXY target
tproxy: added IPv6 socket lookup function to nf_tproxy_core
be2net: Changes to use only priority codes allowed by f/w
tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled
tproxy: added tproxy sockopt interface in the IPV6 layer
tproxy: added udp6_lib_lookup function
tproxy: added const specifiers to udp lookup functions
tproxy: split off ipv6 defragmentation to a separate module
l2tp: small cleanup
nf_nat: restrict ICMP translation for embedded header
can: mcp251x: fix generation of error frames
can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set
can-raw: add msg_flags to distinguish local traffic
9p: client code cleanup
rds: make local functions/variables static
...
Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and
drivers/net/wireless/ath/ath9k/debug.c as per David
Diffstat (limited to 'include/linux/inetdevice.h')
-rw-r--r-- | include/linux/inetdevice.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 2be1a1a2beb9..ccd5b07d678d 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/rcupdate.h> | 9 | #include <linux/rcupdate.h> |
10 | #include <linux/timer.h> | 10 | #include <linux/timer.h> |
11 | #include <linux/sysctl.h> | 11 | #include <linux/sysctl.h> |
12 | #include <linux/rtnetlink.h> | ||
12 | 13 | ||
13 | enum | 14 | enum |
14 | { | 15 | { |
@@ -158,7 +159,12 @@ struct in_ifaddr { | |||
158 | extern int register_inetaddr_notifier(struct notifier_block *nb); | 159 | extern int register_inetaddr_notifier(struct notifier_block *nb); |
159 | extern int unregister_inetaddr_notifier(struct notifier_block *nb); | 160 | extern int unregister_inetaddr_notifier(struct notifier_block *nb); |
160 | 161 | ||
161 | extern struct net_device *ip_dev_find(struct net *net, __be32 addr); | 162 | extern struct net_device *__ip_dev_find(struct net *net, __be32 addr, bool devref); |
163 | static inline struct net_device *ip_dev_find(struct net *net, __be32 addr) | ||
164 | { | ||
165 | return __ip_dev_find(net, addr, true); | ||
166 | } | ||
167 | |||
162 | extern int inet_addr_onlink(struct in_device *in_dev, __be32 a, __be32 b); | 168 | extern int inet_addr_onlink(struct in_device *in_dev, __be32 a, __be32 b); |
163 | extern int devinet_ioctl(struct net *net, unsigned int cmd, void __user *); | 169 | extern int devinet_ioctl(struct net *net, unsigned int cmd, void __user *); |
164 | extern void devinet_init(void); | 170 | extern void devinet_init(void); |
@@ -198,14 +204,10 @@ static __inline__ int bad_mask(__be32 mask, __be32 addr) | |||
198 | 204 | ||
199 | static inline struct in_device *__in_dev_get_rcu(const struct net_device *dev) | 205 | static inline struct in_device *__in_dev_get_rcu(const struct net_device *dev) |
200 | { | 206 | { |
201 | struct in_device *in_dev = dev->ip_ptr; | 207 | return rcu_dereference(dev->ip_ptr); |
202 | if (in_dev) | ||
203 | in_dev = rcu_dereference(in_dev); | ||
204 | return in_dev; | ||
205 | } | 208 | } |
206 | 209 | ||
207 | static __inline__ struct in_device * | 210 | static inline struct in_device *in_dev_get(const struct net_device *dev) |
208 | in_dev_get(const struct net_device *dev) | ||
209 | { | 211 | { |
210 | struct in_device *in_dev; | 212 | struct in_device *in_dev; |
211 | 213 | ||
@@ -217,10 +219,9 @@ in_dev_get(const struct net_device *dev) | |||
217 | return in_dev; | 219 | return in_dev; |
218 | } | 220 | } |
219 | 221 | ||
220 | static __inline__ struct in_device * | 222 | static inline struct in_device *__in_dev_get_rtnl(const struct net_device *dev) |
221 | __in_dev_get_rtnl(const struct net_device *dev) | ||
222 | { | 223 | { |
223 | return (struct in_device*)dev->ip_ptr; | 224 | return rcu_dereference_check(dev->ip_ptr, lockdep_rtnl_is_held()); |
224 | } | 225 | } |
225 | 226 | ||
226 | extern void in_dev_finish_destroy(struct in_device *idev); | 227 | extern void in_dev_finish_destroy(struct in_device *idev); |