[ovs-dev] [RFC PATCH kernel 01/10] openvswitch: fix CHECKSUM_PARTIAL with tunnels
Jiri Benc
jbenc at redhat.com
Thu May 14 18:10:43 UTC 2015
When the packet ovs gets from a NIC driver is CHECKSUM_PARTIAL and it goes
through decapsulation, csum_start may point before the skb->data after the
decapsulation. This triggers a BUG_ON in skb_checksum_help.
As we don't need to calculate the checksum for the header that was already
stripped, just skip the skb_checksum_help call in such case.
Signed-off-by: Jiri Benc <jbenc at redhat.com>
---
net/openvswitch/datapath.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 3b90461317ec..ea7c82a86f19 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -439,6 +439,7 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
/* Complete checksum if needed */
if (skb->ip_summed == CHECKSUM_PARTIAL &&
+ skb_checksum_start_offset(skb) >= 0 &&
(err = skb_checksum_help(skb)))
goto out;
--
1.8.3.1
More information about the dev
mailing list