]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Nov 2014 19:52:20 +0000 (14:52 -0500)
commitb29d9c625642594119e44c2c00441f6b4a959b64
tree03683cd036092b08a4664d8728c5e300e4e35fb6
parent6d02324238af8aa357c5d33cc52928ca3b890b03
macvtap: Fix csum_start when VLAN tags are present

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: e92ae3ec2084 ("macvtap: restore vlan header on user read")
Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvtap.c