On Tue, Dec 13, 2005 at 06:30:38AM +0000, Paul Erkkila wrote:
>
> GRE tunnel.
> 
> ip tunnel:
> tunnel0: gre/ip  remote xx.xx.xx.xx  local xx.xx.xx.xx  ttl 255  key
> xx.xx.xx.xx
>   Checksum in received packet is required.
>   Checksum output packets.

Thanks.  It turns out to be a bug in the GRE layer.  I added that
bug when I introduced skb_postpull_rcsum.

[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: Herbert Xu <[EMAIL PROTECTED]>

Dave, please apply this if this works for Paul.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -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

Reply via email to