[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 <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
c1d2bbe1cd
commit
e2d1bca7e6
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user