summaryrefslogtreecommitdiff
path: root/net/ipv4/ip_gre.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-01-30 00:32:13 +0400
committerDavid S. Miller <davem@davemloft.net>2013-01-30 00:32:13 +0400
commitf1e7b73acc26e8908af783bcd3a9900fd80688f5 (patch)
tree9a9382fb7f12f1889020efb4bffa3f4a88589fc5 /net/ipv4/ip_gre.c
parent218774dc341f219bfcf940304a081b121a0e8099 (diff)
parentfc16e884a2320198b8cb7bc2fdcf6b4485e79709 (diff)
downloadlinux-f1e7b73acc26e8908af783bcd3a9900fd80688f5.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Bring in the 'net' tree so that we can get some ipv4/ipv6 bug fixes that some net-next work will build upon. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r--net/ipv4/ip_gre.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 801e02355ec4..00a14b9864ea 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -965,8 +965,12 @@ static netdev_tx_t ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev
ptr--;
}
if (tunnel->parms.o_flags&GRE_CSUM) {
+ int offset = skb_transport_offset(skb);
+
*ptr = 0;
- *(__sum16 *)ptr = ip_compute_csum((void *)(iph+1), skb->len - sizeof(struct iphdr));
+ *(__sum16 *)ptr = csum_fold(skb_checksum(skb, offset,
+ skb->len - offset,
+ 0));
}
}