tun: remove bogus hardware vlan acceleration flags from vlan_features
authorFernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Tue, 18 Feb 2014 12:20:09 +0000 (21:20 +0900)
committerJiri Slaby <jslaby@suse.cz>
Thu, 13 Mar 2014 22:19:38 +0000 (23:19 +0100)
commitcbf5a3f6866d1bd105da94090ce7446ef20c610b
treee0ac4e0fc909259c610ac8ddd9a7a64e00178112
parentcc9f71b2cc82f1fb66dc5d1ff3fc4eefe8b06f91
tun: remove bogus hardware vlan acceleration flags from vlan_features

[ Upstream commit 6671b2240c54585d4afb5286a29f1569fe5e40a8 ]

Even though only the outer vlan tag can be HW accelerated in the transmission
path, in the TUN/TAP driver vlan_features mirrors hw_features, which happens
to have the NETIF_F_HW_VLAN_?TAG_TX flags set. Because of this, during packet
tranmisssion through a stacked vlan device dev_hard_start_xmit, (incorrectly)
assuming that the vlan device supports hardware vlan acceleration, does not
add the vlan header to the skb payload and the inner vlan tags are lost
(vlan_tci contains the outer vlan tag when userspace reads the packet from
the tap device).

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/tun.c