Commit f0621582 authored by Mitsuru Kanda's avatar Mitsuru Kanda Committed by David S. Miller

[IPSEC]: Fix ipcomp header handling in ipv4 IPCOMP.

parent a79a4d18
......@@ -94,7 +94,9 @@ static int ipcomp_input(struct xfrm_state *x,
memcpy(&tmp_iph, iph, iph->ihl * 4);
nexthdr = *(u8 *)skb->data;
skb_pull(skb, sizeof(struct ipcomp_hdr));
skb->nh.raw += sizeof(struct ipcomp_hdr);
memcpy(skb->nh.raw, &tmp_iph, tmp_iph.iph.ihl * 4);
iph = skb->nh.iph;
iph->tot_len = htons(ntohs(iph->tot_len) - sizeof(struct ipcomp_hdr));
iph->protocol = nexthdr;
skb->h.raw = skb->data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment