Commit 7529390d authored by Davide Caratti's avatar Davide Caratti Committed by David S. Miller

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: default avatarDavide Caratti <dcaratti@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 43c26a1a
...@@ -453,7 +453,7 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb, ...@@ -453,7 +453,7 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
/* Complete checksum if needed */ /* Complete checksum if needed */
if (skb->ip_summed == CHECKSUM_PARTIAL && if (skb->ip_summed == CHECKSUM_PARTIAL &&
(err = skb_checksum_help(skb))) (err = skb_csum_hwoffload_help(skb, 0)))
goto out; goto out;
/* Older versions of OVS user space enforce alignment of the last /* Older versions of OVS user space enforce alignment of the last
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment