mac80211: fix VLAN handling with TXQs
authorJohannes Berg <johannes.berg@intel.com>
Thu, 22 Jun 2017 10:20:30 +0000 (12:20 +0200)
committerpopcornmix <popcornmix@gmail.com>
Fri, 6 Oct 2017 12:06:48 +0000 (13:06 +0100)
commit4b93fae5842f33628161b39ef5f87c6106066417
treeca1831f832571da3a01b0a8a0d786e8079bb217f
parent936b36d1cc0c4c35b4e80e9b2a21a3bffe5830df
mac80211: fix VLAN handling with TXQs

commit 53168215909281a09d3afc6fb51a9d4f81f74d39 upstream.

With TXQs, the AP_VLAN interfaces are resolved to their owner AP
interface when enqueuing the frame, which makes sense since the
frame really goes out on that as far as the driver is concerned.

However, this introduces a problem: frames to be encrypted with
a VLAN-specific GTK will now be encrypted with the AP GTK, since
the information about which virtual interface to use to select
the key is taken from the TXQ.

Fix this by preserving info->control.vif and using that in the
dequeue function. This now requires doing the driver-mapping
in the dequeue as well.

Since there's no way to filter the frames that are sitting on a
TXQ, drop all frames, which may affect other interfaces, when an
AP_VLAN is removed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/mac80211.h
net/mac80211/iface.c
net/mac80211/tx.c