]> git.baikalelectronics.ru Git - kernel.git/commit
netvsc: fix incorrect receive checksum offloading
authorStephen Hemminger <sthemmin@microsoft.com>
Mon, 24 Oct 2016 04:32:47 +0000 (21:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Oct 2016 03:18:36 +0000 (23:18 -0400)
commit26a904e1d564f7b834fd0359bc8774f509cf19b9
tree735e5655df5c00b144df54885fd1a0ae419a6639
parent9ad9ac9ff0278b78e38d5d526e3b29535f0c7e74
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>
drivers/net/hyperv/netvsc_drv.c