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>
This commit is contained in:
Alexey Dobriyan
2008-11-25 17:35:18 -08:00
committed by David S. Miller
parent cdcbca7c1f
commit 52479b623d
22 changed files with 75 additions and 67 deletions
+8 -8
View File
@@ -291,21 +291,21 @@ enum {
struct flowi;
#ifndef CONFIG_XFRM
static inline int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
struct sock *sk, int flags)
static inline int xfrm_lookup(struct net *net, struct dst_entry **dst_p,
struct flowi *fl, struct sock *sk, int flags)
{
return 0;
}
static inline int __xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
struct sock *sk, int flags)
static inline int __xfrm_lookup(struct net *net, struct dst_entry **dst_p,
struct flowi *fl, struct sock *sk, int flags)
{
return 0;
}
#else
extern int xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
struct sock *sk, int flags);
extern int __xfrm_lookup(struct dst_entry **dst_p, struct flowi *fl,
struct sock *sk, int flags);
extern int xfrm_lookup(struct net *net, struct dst_entry **dst_p,
struct flowi *fl, struct sock *sk, int flags);
extern int __xfrm_lookup(struct net *net, struct dst_entry **dst_p,
struct flowi *fl, struct sock *sk, int flags);
#endif
#endif