From e2d1bca7e6134671bcb19810d004a252aa6a644d Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 10 Apr 2007 20:46:21 -0700 Subject: [SK_BUFF]: Use skb_reset_network_header in skb_push cases skb_push updates and returns skb->data, so we can just call skb_reset_network_header after the call to skb_push. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- net/ipv4/xfrm4_mode_transport.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'net/ipv4/xfrm4_mode_transport.c') diff --git a/net/ipv4/xfrm4_mode_transport.c b/net/ipv4/xfrm4_mode_transport.c index 92676b7e4034..290c0f2e7c29 100644 --- a/net/ipv4/xfrm4_mode_transport.c +++ b/net/ipv4/xfrm4_mode_transport.c @@ -32,7 +32,9 @@ static int xfrm4_transport_output(struct xfrm_state *x, struct sk_buff *skb) ihl = iph->ihl * 4; skb->h.raw += ihl; - skb->nh.raw = memmove(skb_push(skb, x->props.header_len), iph, ihl); + skb_push(skb, x->props.header_len); + skb_reset_network_header(skb); + memmove(skb->nh.raw, iph, ihl); return 0; } -- cgit v1.2.3