summaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-25 17:35:44 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-25 17:35:44 -0800
commitf6e1e25d703c0a9ba1863384a16851dec52f8e3a (patch)
treecd89a1a4f3d4f6c54448d922347f4054ea6e04a0 /include/net/xfrm.h
parent52479b623d3d41df84c499325b6a8c7915413032 (diff)
downloadblackbird-obmc-linux-f6e1e25d703c0a9ba1863384a16851dec52f8e3a.tar.gz
blackbird-obmc-linux-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/net/xfrm.h')
-rw-r--r--include/net/xfrm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 1dc4ff0f4851..158848f55640 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);
}
OpenPOWER on IntegriCloud