diff options
author | Johannes Berg <johannes.berg@intel.com> | 2016-12-08 17:22:09 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-12-09 12:57:49 +0100 |
commit | e6f462df9acd2a3295e5d34eb29e2823220cf129 (patch) | |
tree | d37ebb6de38029d804d0eb6abbe2a495d5de1558 /include/net | |
parent | nl80211: Use different attrs for BSSID and random MAC addr in scan req (diff) | |
download | linux-e6f462df9acd2a3295e5d34eb29e2823220cf129.tar.xz linux-e6f462df9acd2a3295e5d34eb29e2823220cf129.zip |
cfg80211/mac80211: fix BSS leaks when abandoning assoc attempts
When mac80211 abandons an association attempt, it may free
all the data structures, but inform cfg80211 and userspace
about it only by sending the deauth frame it received, in
which case cfg80211 has no link to the BSS struct that was
used and will not cfg80211_unhold_bss() it.
Fix this by providing a way to inform cfg80211 of this with
the BSS entry passed, so that it can clean up properly, and
use this ability in the appropriate places in mac80211.
This isn't ideal: some code is more or less duplicated and
tracing is missing. However, it's a fairly small change and
it's thus easier to backport - cleanups can come later.
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/cfg80211.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 2019310cf135..814be4b4200c 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -4686,6 +4686,17 @@ void cfg80211_rx_assoc_resp(struct net_device *dev, void cfg80211_assoc_timeout(struct net_device *dev, struct cfg80211_bss *bss); /** + * cfg80211_abandon_assoc - notify cfg80211 of abandoned association attempt + * @dev: network device + * @bss: The BSS entry with which association was abandoned. + * + * Call this whenever - for reasons reported through other API, like deauth RX, + * an association attempt was abandoned. + * This function may sleep. The caller must hold the corresponding wdev's mutex. + */ +void cfg80211_abandon_assoc(struct net_device *dev, struct cfg80211_bss *bss); + +/** * cfg80211_tx_mlme_mgmt - notification of transmitted deauth/disassoc frame * @dev: network device * @buf: 802.11 frame (header + body) |