aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@codeaurora.org>2020-06-02 06:14:28 (GMT)
committerJouni Malinen <j@w1.fi>2020-06-10 18:34:38 (GMT)
commit1f72bbbefb5d7aed5636415b6edbfde4d15fff9d (patch)
treee28490e708acc9cf6d410b0e7bab9620175ee6c2
parent088bef178656c97d096e503382f64ff13a041067 (diff)
downloadhostap-1f72bbbefb5d7aed5636415b6edbfde4d15fff9d.zip
hostap-1f72bbbefb5d7aed5636415b6edbfde4d15fff9d.tar.gz
hostap-1f72bbbefb5d7aed5636415b6edbfde4d15fff9d.tar.bz2
AP: Reject association request upon invalid HE capabilities
Operation in the 6 GHz band mandates valid HE capabilities element in station negotiation. Reject association request upon receiving invalid or missing HE elements. Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
-rw-r--r--src/ap/ieee802_11.c7
-rw-r--r--src/common/ieee802_11_common.c1
-rw-r--r--src/common/ieee802_11_defs.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 6723f33..4f4e548 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -3230,6 +3230,13 @@ static int check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta,
if (resp != WLAN_STATUS_SUCCESS)
return resp;
if (is_6ghz_op_class(hapd->iconf->op_class)) {
+ if (!(sta->flags & WLAN_STA_HE)) {
+ hostapd_logger(hapd, sta->addr,
+ HOSTAPD_MODULE_IEEE80211,
+ HOSTAPD_LEVEL_INFO,
+ "Station does not support mandatory HE PHY - reject association");
+ return WLAN_STATUS_DENIED_HE_NOT_SUPPORTED;
+ }
resp = copy_sta_he_6ghz_capab(hapd, sta,
elems.he_6ghz_band_cap);
if (resp != WLAN_STATUS_SUCCESS)
diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c
index 9cd6317..c4e7446 100644
--- a/src/common/ieee802_11_common.c
+++ b/src/common/ieee802_11_common.c
@@ -1762,6 +1762,7 @@ const char * status2str(u16 status)
S2S(FILS_AUTHENTICATION_FAILURE)
S2S(UNKNOWN_AUTHENTICATION_SERVER)
S2S(UNKNOWN_PASSWORD_IDENTIFIER)
+ S2S(DENIED_HE_NOT_SUPPORTED)
S2S(SAE_HASH_TO_ELEMENT)
S2S(SAE_PK)
}
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index da0e7bd..4d3037e 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -204,6 +204,7 @@
#define WLAN_STATUS_FILS_AUTHENTICATION_FAILURE 112
#define WLAN_STATUS_UNKNOWN_AUTHENTICATION_SERVER 113
#define WLAN_STATUS_UNKNOWN_PASSWORD_IDENTIFIER 123
+#define WLAN_STATUS_DENIED_HE_NOT_SUPPORTED 124
#define WLAN_STATUS_SAE_HASH_TO_ELEMENT 126
#define WLAN_STATUS_SAE_PK 127