Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f5c0cb0 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by David S. Miller
Browse files

[SK_BUFF] xfrm4: use skb_reset_network_header



Setting it to skb->h.raw, which is valid, in the (to become) old pointer based
world order and in the new world of offset based layer headers.

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1ced98e8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -50,8 +50,10 @@ static int xfrm4_transport_input(struct xfrm_state *x, struct sk_buff *skb)
{
	int ihl = skb->data - skb->h.raw;

	if (skb->h.raw != skb->nh.raw)
		skb->nh.raw = memmove(skb->h.raw, skb->nh.raw, ihl);
	if (skb->h.raw != skb->nh.raw) {
		memmove(skb->h.raw, skb->nh.raw, ihl);
		skb->nh.raw = skb->h.raw;
	}
	skb->nh.iph->tot_len = htons(skb->len + ihl);
	skb->h.raw = skb->data;
	return 0;