summaryrefslogtreecommitdiff
path: root/package/hostapd
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-05-28 16:27:17 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-05-28 16:27:17 +0000
commit6e9542e3920b90a68225b2d4242ffa6ed8c79c49 (patch)
tree70e06a1f467b87dd0dfd8bd46d804d1c9ce4ab6e /package/hostapd
parent1b2b3be64d236d2991836dc21066acc102c63f6b (diff)
downloadmtk-20170518-6e9542e3920b90a68225b2d4242ffa6ed8c79c49.zip
mtk-20170518-6e9542e3920b90a68225b2d4242ffa6ed8c79c49.tar.gz
mtk-20170518-6e9542e3920b90a68225b2d4242ffa6ed8c79c49.tar.bz2
hostapd: fix a race condition related to assoc response tx status processing
SVN-Revision: 27022
Diffstat (limited to 'package/hostapd')
-rw-r--r--package/hostapd/patches/740-process_assoc_resp_tx_status.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/package/hostapd/patches/740-process_assoc_resp_tx_status.patch b/package/hostapd/patches/740-process_assoc_resp_tx_status.patch
new file mode 100644
index 0000000..a0d9a0f
--- /dev/null
+++ b/package/hostapd/patches/740-process_assoc_resp_tx_status.patch
@@ -0,0 +1,48 @@
+--- a/src/ap/ieee802_11.c
++++ b/src/ap/ieee802_11.c
+@@ -1629,13 +1629,6 @@ static void handle_assoc_cb(struct hosta
+ int new_assoc = 1;
+ struct ieee80211_ht_capabilities ht_cap;
+
+- if (!ok) {
+- hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
+- HOSTAPD_LEVEL_DEBUG,
+- "did not acknowledge association response");
+- return;
+- }
+-
+ if (len < IEEE80211_HDRLEN + (reassoc ? sizeof(mgmt->u.reassoc_resp) :
+ sizeof(mgmt->u.assoc_resp))) {
+ printf("handle_assoc_cb(reassoc=%d) - too short payload "
+@@ -1643,11 +1636,6 @@ static void handle_assoc_cb(struct hosta
+ return;
+ }
+
+- if (reassoc)
+- status = le_to_host16(mgmt->u.reassoc_resp.status_code);
+- else
+- status = le_to_host16(mgmt->u.assoc_resp.status_code);
+-
+ sta = ap_get_sta(hapd, mgmt->da);
+ if (!sta) {
+ printf("handle_assoc_cb: STA " MACSTR " not found\n",
+@@ -1655,6 +1643,19 @@ static void handle_assoc_cb(struct hosta
+ return;
+ }
+
++ if (!ok) {
++ hostapd_logger(hapd, mgmt->da, HOSTAPD_MODULE_IEEE80211,
++ HOSTAPD_LEVEL_DEBUG,
++ "did not acknowledge association response");
++ sta->flags &= ~WLAN_STA_ASSOC_REQ_OK;
++ return;
++ }
++
++ if (reassoc)
++ status = le_to_host16(mgmt->u.reassoc_resp.status_code);
++ else
++ status = le_to_host16(mgmt->u.assoc_resp.status_code);
++
+ if (status != WLAN_STATUS_SUCCESS)
+ goto fail;
+