Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122214
b: refs/heads/master
c: 99a6665
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Dobriyan authored and David S. Miller committed Nov 26, 2008
1 parent 0b4f314 commit 4a0ba32
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f6e1e25d703c0a9ba1863384a16851dec52f8e3a
refs/heads/master: 99a66657b2f62ae8b2b1e6ffc6abed051e4561ca
4 changes: 3 additions & 1 deletion trunk/include/net/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,9 @@ extern int __xfrm_route_forward(struct sk_buff *skb, unsigned short family);

static inline int xfrm_route_forward(struct sk_buff *skb, unsigned short family)
{
return !init_net.xfrm.policy_count[XFRM_POLICY_OUT] ||
struct net *net = dev_net(skb->dev);

return !net->xfrm.policy_count[XFRM_POLICY_OUT] ||
(skb->dst->flags & DST_NOXFRM) ||
__xfrm_route_forward(skb, family);
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/xfrm/xfrm_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2044,6 +2044,7 @@ EXPORT_SYMBOL(__xfrm_policy_check);

int __xfrm_route_forward(struct sk_buff *skb, unsigned short family)
{
struct net *net = dev_net(skb->dev);
struct flowi fl;

if (xfrm_decode_session(skb, &fl, family) < 0) {
Expand All @@ -2052,7 +2053,7 @@ int __xfrm_route_forward(struct sk_buff *skb, unsigned short family)
return 0;
}

return xfrm_lookup(&init_net, &skb->dst, &fl, NULL, 0) == 0;
return xfrm_lookup(net, &skb->dst, &fl, NULL, 0) == 0;
}
EXPORT_SYMBOL(__xfrm_route_forward);

Expand Down

0 comments on commit 4a0ba32

Please sign in to comment.