]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] Fix hardware checksum modification
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 14 Dec 2005 21:02:35 +0000 (13:02 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 27 Dec 2005 00:08:56 +0000 (16:08 -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>
Signed-off-by: Chris Wright <chrisw@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/ip_gre.c

index 896ce3f8f53addd02db7e6beaaa205a7275da262..fa64931cff5f12b41ceabf0bba335baf435d3337 100644 (file)
@@ -617,7 +617,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