[GRE]: Fix hardware checksum modification
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 14 Dec 2005 20:55:24 +0000 (12:55 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Dec 2005 20:55:24 +0000 (12:55 -0800)
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: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c

index a4c347c3b8e3a169f9e1b37603ce02378cee1d55..46f9d9cf7a5f41b64c0d2a9e68d8ab19be8e14c5 100644 (file)
@@ -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