diff options
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 9c068ab3a834..cb81ca35b0d6 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -2027,6 +2027,8 @@ int __xfrm_route_forward(struct sk_buff *skb, unsigned short family) | |||
2027 | { | 2027 | { |
2028 | struct net *net = dev_net(skb->dev); | 2028 | struct net *net = dev_net(skb->dev); |
2029 | struct flowi fl; | 2029 | struct flowi fl; |
2030 | struct dst_entry *dst; | ||
2031 | int res; | ||
2030 | 2032 | ||
2031 | if (xfrm_decode_session(skb, &fl, family) < 0) { | 2033 | if (xfrm_decode_session(skb, &fl, family) < 0) { |
2032 | /* XXX: we should have something like FWDHDRERROR here. */ | 2034 | /* XXX: we should have something like FWDHDRERROR here. */ |
@@ -2034,7 +2036,11 @@ int __xfrm_route_forward(struct sk_buff *skb, unsigned short family) | |||
2034 | return 0; | 2036 | return 0; |
2035 | } | 2037 | } |
2036 | 2038 | ||
2037 | return xfrm_lookup(net, &skb->dst, &fl, NULL, 0) == 0; | 2039 | dst = skb_dst(skb); |
2040 | |||
2041 | res = xfrm_lookup(net, &dst, &fl, NULL, 0) == 0; | ||
2042 | skb_dst_set(skb, dst); | ||
2043 | return res; | ||
2038 | } | 2044 | } |
2039 | EXPORT_SYMBOL(__xfrm_route_forward); | 2045 | EXPORT_SYMBOL(__xfrm_route_forward); |
2040 | 2046 | ||