mac80211: fix VLAN handling with TXQs
authorJohannes Berg <johannes.berg@intel.com>
Thu, 22 Jun 2017 10:20:30 +0000 (12:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Oct 2017 07:43:58 +0000 (09:43 +0200)
commit59862b0429d98f958c44a9e51cb317773ee28ba9
tree38ef3dc027419f6ec899d0edbaa3dfc7fb29b055
parent9ad15a25669ec8c120e910cf18620af2455cb6df
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