aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunil Dutt <usdutt@qti.qualcomm.com>2016-01-14 18:25:57 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-06-20 22:09:46 -0700
commit38b8dc8a1c61bd268f0f4eea3f1fb0169583352b (patch)
tree86fccb71eb461182ad0fd83a91d4667e7e80ec1a
parent62cd79d473cda37895c02c7a003bcf7c5ea03603 (diff)
downloadandroid_external_wpa_supplicant_8-38b8dc8a1c61bd268f0f4eea3f1fb0169583352b.tar.gz
android_external_wpa_supplicant_8-38b8dc8a1c61bd268f0f4eea3f1fb0169583352b.tar.bz2
android_external_wpa_supplicant_8-38b8dc8a1c61bd268f0f4eea3f1fb0169583352b.zip
hostapd: Skip hostapd ACL check for drivers supporting ACL offload
Commit 0603bcb7fe8babf183362518238c142afe8e2036 ('hostapd: Process MAC ACLs on a station association event (SME in driver)') processes MAC ACL on a station association event for drivers which use AP SME offload but does not consider the scenario where the drivers offload ACL. This can result in station disconnection, though the driver accepts the connection. Address this by avoiding the hostapd ACL check for the drivers offloading MAC ACL. CRs-Fixed: 1031991 Git-commit: bb4e19e3f4c9d1973279b3b768bc0539ee7cb962 Git-repo : git://w1.fi/srv/git/hostap.git Change-Id: I2934fbf676c803059e62ba2436c1181efb05a294 Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-rw-r--r--src/ap/drv_callbacks.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index fbbfe12c..cc664d78 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -115,8 +115,15 @@ int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
}
sta->flags &= ~(WLAN_STA_WPS | WLAN_STA_MAYBE_WPS | WLAN_STA_WPS2);
- res = hostapd_check_acl(hapd, addr, NULL);
- if (res != HOSTAPD_ACL_ACCEPT) {
+ /*
+ * ACL configurations to the drivers (implementing AP SME and ACL
+ * offload) without hostapd's knowledge, can result in a disconnection
+ * though the driver accepts the connection. Skip the hostapd check for
+ * ACL if the driver supports ACL offload to avoid potentially
+ * conflicting ACL rules.
+ */
+ if (hapd->iface->drv_max_acl_mac_addrs == 0 &&
+ hostapd_check_acl(hapd, addr, NULL) != HOSTAPD_ACL_ACCEPT) {
wpa_printf(MSG_INFO, "STA " MACSTR " not allowed to connect",
MAC2STR(addr));
reason = WLAN_REASON_UNSPECIFIED;