diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-11-25 17:35:44 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-25 17:35:44 -0800 |
commit | f6e1e25d703c0a9ba1863384a16851dec52f8e3a (patch) | |
tree | cd89a1a4f3d4f6c54448d922347f4054ea6e04a0 /include | |
parent | 52479b623d3d41df84c499325b6a8c7915413032 (diff) | |
download | linux-3.10-f6e1e25d703c0a9ba1863384a16851dec52f8e3a.tar.gz linux-3.10-f6e1e25d703c0a9ba1863384a16851dec52f8e3a.tar.bz2 linux-3.10-f6e1e25d703c0a9ba1863384a16851dec52f8e3a.zip |
netns xfrm: xfrm_policy_check in netns
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/xfrm.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 1dc4ff0f485..158848f5564 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -992,12 +992,13 @@ static inline int __xfrm_policy_check2(struct sock *sk, int dir, struct sk_buff *skb, unsigned int family, int reverse) { + struct net *net = dev_net(skb->dev); int ndir = dir | (reverse ? XFRM_POLICY_MASK + 1 : 0); if (sk && sk->sk_policy[XFRM_POLICY_IN]) return __xfrm_policy_check(sk, ndir, skb, family); - return (!init_net.xfrm.policy_count[dir] && !skb->sp) || + return (!net->xfrm.policy_count[dir] && !skb->sp) || (skb->dst->flags & DST_NOPOLICY) || __xfrm_policy_check(sk, ndir, skb, family); } |