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

[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
...@@ -618,7 +618,7 @@ static int ipgre_rcv(struct sk_buff *skb) ...@@ -618,7 +618,7 @@ static int ipgre_rcv(struct sk_buff *skb)
skb->mac.raw = skb->nh.raw; skb->mac.raw = skb->nh.raw;
skb->nh.raw = __pskb_pull(skb, offset); 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)); memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
skb->pkt_type = PACKET_HOST; skb->pkt_type = PACKET_HOST;
#ifdef CONFIG_NET_IPGRE_BROADCAST #ifdef CONFIG_NET_IPGRE_BROADCAST
......
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