summaryrefslogtreecommitdiffstats
path: root/net/openvswitch
diff options
context:
space:
mode:
authorDavide Caratti <dcaratti@redhat.com>2017-05-18 15:44:42 +0200
committerDavid S. Miller <davem@davemloft.net>2017-05-19 19:21:29 -0400
commit7529390d08f07fbf9b0174c5a87600b5caa1a8e8 (patch)
tree8cbd659020f65449b91f5f28db31f07e289bf506 /net/openvswitch
parent43c26a1a45938624fb9301e8bf7dfabbed293619 (diff)
downloadlinux-7529390d08f07fbf9b0174c5a87600b5caa1a8e8.tar.gz
linux-7529390d08f07fbf9b0174c5a87600b5caa1a8e8.tar.bz2
linux-7529390d08f07fbf9b0174c5a87600b5caa1a8e8.zip
openvswitch: more accurate checksumming in queue_userspace_packet()
if skb carries an SCTP packet and ip_summed is CHECKSUM_PARTIAL, it needs CRC32c in place of Internet Checksum: use skb_csum_hwoffload_help to avoid corrupting such packets while queueing them towards userspace. Signed-off-by: Davide Caratti <dcaratti@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch')
-rw-r--r--net/openvswitch/datapath.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 7b17da9a94a0..9ddc9f8412a2 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -453,7 +453,7 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
/* Complete checksum if needed */
if (skb->ip_summed == CHECKSUM_PARTIAL &&
- (err = skb_checksum_help(skb)))
+ (err = skb_csum_hwoffload_help(skb, 0)))
goto out;
/* Older versions of OVS user space enforce alignment of the last