]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Wed, 19 Nov 2014 17:38:15 +0000 (18:38 +0100)
commitc150584886e5542df2a9fb4d0189f492d9d69b35
tree0547d5165e7791039d06c90f01bfe0a1a1669958
parent50e52368e667f2a8d5a43c0c9f60b4391a5bc715
tun: Fix csum_start with VLAN acceleration

commit a8f9bfdf982e2b1fb9f094e4de9ab08c57f3d2fd upstream.

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: 6680ec68eff4 ("tuntap: hardware vlan tx support")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/tun.c