]> git.baikalelectronics.ru Git - kernel.git/commit
tun: fix csum generation for tap devices
authorPaolo Abeni <pabeni@redhat.com>
Mon, 13 Jun 2016 22:00:04 +0000 (00:00 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Jun 2016 21:00:33 +0000 (14:00 -0700)
commitb44225b26761c015d4a6b06845b298a2df766f43
tree758e01aab610991fe7a24ea82e5279b48445bc24
parentfcdcf07a38c70aeda5b1e9b3982aaccf15435533
tun: fix csum generation for tap devices

The commit 5c93bca40d13 ("tuntap: use common code for virtio_net_hdr
and skb GSO conversion") replaced the tun code for header manipulation
with the generic helpers. While doing so, it implictly moved the
skb_partial_csum_set() invocation after eth_type_trans(), which
invalidate the current gso start/offset values.
Fix it by moving the helper invocation before the mac pulling.

Fixes: 5c93bca40d1 ("tuntap: use common code for virtio_net_hdr and skb GSO conversion")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c