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/net | |
parent | 52479b623d3d41df84c499325b6a8c7915413032 (diff) | |
download | kernel_samsung_smdk4412-f6e1e25d703c0a9ba1863384a16851dec52f8e3a.zip kernel_samsung_smdk4412-f6e1e25d703c0a9ba1863384a16851dec52f8e3a.tar.gz kernel_samsung_smdk4412-f6e1e25d703c0a9ba1863384a16851dec52f8e3a.tar.bz2 |
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/net')
-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 1dc4ff0..158848f 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); } |