]> www.infradead.org Git - users/jedix/linux-maple.git/commit
netvsc: fix incorrect receive checksum offloading
authorStephen Hemminger <sthemmin@microsoft.com>
Mon, 24 Oct 2016 04:32:47 +0000 (21:32 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 26 Feb 2017 05:25:40 +0000 (21:25 -0800)
commit31961aaaa956edf56c7a3a1905a46f2213788c73
treead6db06a96faa2e88b4e2aed4828b7a44de98995
parenta530d45ee710ddc8f6c3a40d2511aee287bc7fe5
netvsc: fix incorrect receive checksum offloading

The Hyper-V netvsc driver was looking at the incorrect status bits
in the checksum info. It was setting the receive checksum unnecessary
flag based on the IP header checksum being correct. The checksum
flag is skb is about TCP and UDP checksum status. Because of this
bug, any packet received with bad TCP checksum would be passed
up the stack and to the application causing data corruption.
The problem is reproducible via netcat and netem.

This had a side effect of not doing receive checksum offload
on IPv6. The driver was also also always doing checksum offload
independent of the checksum setting done via ethtool.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 25219569

(cherry picked from commit e52fed7177f74382f742c27de2cc5314790aebb6)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/hyperv/netvsc_drv.c