aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-06-10 18:35:11 (GMT)
committerJouni Malinen <j@w1.fi>2016-06-10 18:44:49 (GMT)
commit6996ff7b6d32ca5360ace3a64888cca8fe892662 (patch)
tree59a0b6446151b68803cd3827d4a53a6c336233b8
parent78a36327652673fa182395011420c3151e1e03e8 (diff)
downloadhostap-6996ff7b6d32ca5360ace3a64888cca8fe892662.zip
hostap-6996ff7b6d32ca5360ace3a64888cca8fe892662.tar.gz
hostap-6996ff7b6d32ca5360ace3a64888cca8fe892662.tar.bz2
hostapd: Fix Public Action frame TX status processing for wildcard BSSID
Previously all TX status events with wildcard BSSID were ignored. This did not allow Public Action frame TX status to be processed with the corrected wildcard BSSID use. Fix this to be allowed. In practice, this affects only test cases since Action frame TX status was not used for anything else. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--src/ap/drv_callbacks.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index 3ab5bf3..02557ab 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -916,11 +916,24 @@ static void hostapd_mgmt_tx_cb(struct hostapd_data *hapd, const u8 *buf,
size_t len, u16 stype, int ok)
{
struct ieee80211_hdr *hdr;
+ struct hostapd_data *orig_hapd = hapd;
hdr = (struct ieee80211_hdr *) buf;
hapd = get_hapd_bssid(hapd->iface, get_hdr_bssid(hdr, len));
- if (hapd == NULL || hapd == HAPD_BROADCAST)
+ if (!hapd)
return;
+ if (hapd == HAPD_BROADCAST) {
+ if (stype != WLAN_FC_STYPE_ACTION || len <= 25 ||
+ buf[24] != WLAN_ACTION_PUBLIC)
+ return;
+ hapd = get_hapd_bssid(orig_hapd->iface, hdr->addr2);
+ if (!hapd || hapd == HAPD_BROADCAST)
+ return;
+ /*
+ * Allow processing of TX status for a Public Action frame that
+ * used wildcard BBSID.
+ */
+ }
ieee802_11_mgmt_cb(hapd, buf, len, stype, ok);
}