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

Commit 1542272a authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller
Browse files

[GRE]: Fix hardware checksum modification



The skb_postpull_rcsum introduced a bug to the checksum modification.
Although the length pulled is offset bytes, the origin of the pulling
is the GRE header, not the IP header.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent acd9b7b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -618,7 +618,7 @@ static int ipgre_rcv(struct sk_buff *skb)

		skb->mac.raw = skb->nh.raw;
		skb->nh.raw = __pskb_pull(skb, offset);
		skb_postpull_rcsum(skb, skb->mac.raw, offset);
		skb_postpull_rcsum(skb, skb->h.raw, offset);
		memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
		skb->pkt_type = PACKET_HOST;
#ifdef CONFIG_NET_IPGRE_BROADCAST