]> git.baikalelectronics.ru Git - kernel.git/commit
tun: Fix csum_start with VLAN acceleration
authorHerbert Xu <herbert@gondor.apana.org.au>
Sun, 2 Nov 2014 20:30:13 +0000 (04:30 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Nov 2014 19:27:06 +0000 (14:27 -0500)
commit25654b1a22e95b3fe1106ced4211ed9a0067097d
treef95d7271223a6fb762b1786a4c15f9ecf95c7aed
parent49db1a0f40d30d4d80cfcb22a0f504e2d851ec64
tun: Fix csum_start with VLAN acceleration

When VLAN acceleration is in use on the xmit path, we end up
setting csum_start to the wrong place.  The result is that the
whoever ends up doing the checksum setting will corrupt the packet
instead of writing the checksum to the expected location, usually
this means writing the checksum with an offset of -4.

This patch fixes this by adjusting csum_start when VLAN acceleration
is detected.

Fixes: 889535e30dc7 ("tuntap: hardware vlan tx support")
Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c