diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-11-25 20:35:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-25 20:35:18 -0500 |
commit | 52479b623d3d41df84c499325b6a8c7915413032 (patch) | |
tree | 196f303f296b53dc89a05954d9c03226a9b4158b /include | |
parent | cdcbca7c1f1946758cfacb69bc1c7eeaccb11e2d (diff) |
netns xfrm: lookup in netns
Pass netns to xfrm_lookup()/__xfrm_lookup(). For that pass netns
to flow_cache_lookup() and resolver callback.
Take it from socket or netdevice. Stub DECnet to init_net.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/dst.h | 16 | ||||
-rw-r--r-- | include/net/flow.h | 9 |
2 files changed, 13 insertions, 12 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 6c778799bf10..6be3b082a070 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -291,21 +291,21 @@ enum { | |||
291 | 291 | ||
292 | struct flowi; | 292 | struct flowi; |
293 | #ifndef CONFIG_XFRM | 293 | #ifndef CONFIG_XFRM |
294 | static inline int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, | 294 | static inline int xfrm_lookup(struct net *net, struct dst_entry **dst_p, |
295 | struct sock *sk, int flags) | 295 | struct flowi *fl, struct sock *sk, int flags) |
296 | { | 296 | { |
297 | return 0; | 297 | return 0; |
298 | } | 298 | } |
299 | static inline int __xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, | 299 | static inline int __xfrm_lookup(struct net *net, struct dst_entry **dst_p, |
300 | struct sock *sk, int flags) | 300 | struct flowi *fl, struct sock *sk, int flags) |
301 | { | 301 | { |
302 | return 0; | 302 | return 0; |
303 | } | 303 | } |
304 | #else | 304 | #else |
305 | extern int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, | 305 | extern int xfrm_lookup(struct net *net, struct dst_entry **dst_p, |
306 | struct sock *sk, int flags); | 306 | struct flowi *fl, struct sock *sk, int flags); |
307 | extern int __xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl, | 307 | extern int __xfrm_lookup(struct net *net, struct dst_entry **dst_p, |
308 | struct sock *sk, int flags); | 308 | struct flowi *fl, struct sock *sk, int flags); |
309 | #endif | 309 | #endif |
310 | #endif | 310 | #endif |
311 | 311 | ||
diff --git a/include/net/flow.h b/include/net/flow.h index b45a5e4fcadd..809970b7dfee 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
@@ -84,12 +84,13 @@ struct flowi { | |||
84 | #define FLOW_DIR_OUT 1 | 84 | #define FLOW_DIR_OUT 1 |
85 | #define FLOW_DIR_FWD 2 | 85 | #define FLOW_DIR_FWD 2 |
86 | 86 | ||
87 | struct net; | ||
87 | struct sock; | 88 | struct sock; |
88 | typedef int (*flow_resolve_t)(struct flowi *key, u16 family, u8 dir, | 89 | typedef int (*flow_resolve_t)(struct net *net, struct flowi *key, u16 family, |
89 | void **objp, atomic_t **obj_refp); | 90 | u8 dir, void **objp, atomic_t **obj_refp); |
90 | 91 | ||
91 | extern void *flow_cache_lookup(struct flowi *key, u16 family, u8 dir, | 92 | extern void *flow_cache_lookup(struct net *net, struct flowi *key, u16 family, |
92 | flow_resolve_t resolver); | 93 | u8 dir, flow_resolve_t resolver); |
93 | extern void flow_cache_flush(void); | 94 | extern void flow_cache_flush(void); |
94 | extern atomic_t flow_cache_genid; | 95 | extern atomic_t flow_cache_genid; |
95 | 96 | ||