]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
macvtap: Fix csum_start when VLAN tags are present
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 3 Nov 2014 06:01:25 +0000 (14:01 +0800)
committerJiri Slaby <jslaby@suse.cz>
Wed, 19 Nov 2014 17:38:17 +0000 (18:38 +0100)
commit6e2b9478b3c0545793d0da88287dc417146bad90
treebe2684dc678ffa7ba1757f3df114a7d006b95830
parent8ad766627efd7296267b8ddb231d990f84c90bdd
macvtap: Fix csum_start when VLAN tags are present

commit 3ce9b20f1971690b8b3b620e735ec99431573b39 upstream.

When VLAN is in use in macvtap_put_user, 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 tags are
detected.

Fixes: f09e2249c4f5 ("macvtap: restore vlan header on user read")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvtap.c