aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2011-03-15 17:09:32 -0400
committerDavid S. Miller <davem@davemloft.net>2011-03-27 20:55:01 -0400
commite433430a0ca9cc1b851a83ac3b305e955b64880a (patch)
tree129e0c5db7e5643352ac55a920b5d6c5ef65fb66 /net
parent3bc07321ccc236f693ce1b6a8786f0a2e38bb87e (diff)
dst: Clone child entry in skb_dst_pop
We clone the child entry in skb_dst_pop before we call skb_dst_drop(). Otherwise we might kill the child right before we return it to the caller. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/xfrm/xfrm_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index 8f3f0eedc5a4..47bacd8c0250 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -96,7 +96,7 @@ resume:
96 err = -EHOSTUNREACH; 96 err = -EHOSTUNREACH;
97 goto error_nolock; 97 goto error_nolock;
98 } 98 }
99 skb_dst_set(skb, dst_clone(dst)); 99 skb_dst_set(skb, dst);
100 x = dst->xfrm; 100 x = dst->xfrm;
101 } while (x && !(x->outer_mode->flags & XFRM_MODE_FLAG_TUNNEL)); 101 } while (x && !(x->outer_mode->flags & XFRM_MODE_FLAG_TUNNEL));
102 102