aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-01-01 16:17:02 (GMT)
committerJouni Malinen <j@w1.fi>2019-01-01 16:18:53 (GMT)
commit2ea1fce3d64481f1a766e4b1d63d74c8d93a42c1 (patch)
tree54f63b89f7506cc1d95dd7165e2cbe17513eae12 /src
parent7021d33c9ee59b27d4309f1eb454ab329ea40cdd (diff)
downloadhostap-2ea1fce3d64481f1a766e4b1d63d74c8d93a42c1.zip
hostap-2ea1fce3d64481f1a766e4b1d63d74c8d93a42c1.tar.gz
hostap-2ea1fce3d64481f1a766e4b1d63d74c8d93a42c1.tar.bz2
OCE: RSSI-based rejection to consider Authentication frames (AP)
Try to make RSSI-based rejection of associating stations a bit less likely to trigger false rejections by considering RSSI from the last received Authentication frame. Association is rejected only if both the Authentication and (Re)Association Request frames are below the RSSI threshold. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src')
-rw-r--r--src/ap/ieee802_11.c12
-rw-r--r--src/ap/sta_info.h1
2 files changed, 10 insertions, 3 deletions
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index d364308..a3b5e99 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -1760,7 +1760,8 @@ ieee802_11_set_radius_info(struct hostapd_data *hapd, struct sta_info *sta,
static void handle_auth(struct hostapd_data *hapd,
- const struct ieee80211_mgmt *mgmt, size_t len)
+ const struct ieee80211_mgmt *mgmt, size_t len,
+ int rssi)
{
u16 auth_alg, auth_transaction, status_code;
u16 resp = WLAN_STATUS_SUCCESS;
@@ -1990,6 +1991,9 @@ static void handle_auth(struct hostapd_data *hapd,
}
sta->last_seq_ctrl = seq_ctrl;
sta->last_subtype = WLAN_FC_STYPE_AUTH;
+#ifdef CONFIG_MBO
+ sta->auth_rssi = rssi;
+#endif /* CONFIG_MBO */
res = ieee802_11_set_radius_info(
hapd, sta, res, session_timeout, acct_interim_interval,
@@ -3524,7 +3528,9 @@ static void handle_assoc(struct hostapd_data *hapd,
}
if (hapd->iconf->rssi_reject_assoc_rssi && rssi &&
- rssi < hapd->iconf->rssi_reject_assoc_rssi) {
+ rssi < hapd->iconf->rssi_reject_assoc_rssi &&
+ (sta->auth_rssi == 0 ||
+ sta->auth_rssi < hapd->iconf->rssi_reject_assoc_rssi)) {
resp = WLAN_STATUS_DENIED_POOR_CHANNEL_CONDITIONS;
goto fail;
}
@@ -4166,7 +4172,7 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
switch (stype) {
case WLAN_FC_STYPE_AUTH:
wpa_printf(MSG_DEBUG, "mgmt::auth");
- handle_auth(hapd, mgmt, len);
+ handle_auth(hapd, mgmt, len, ssi_signal);
ret = 1;
break;
case WLAN_FC_STYPE_ASSOC_REQ:
diff --git a/src/ap/sta_info.h b/src/ap/sta_info.h
index 211ef91..5c9bf57 100644
--- a/src/ap/sta_info.h
+++ b/src/ap/sta_info.h
@@ -217,6 +217,7 @@ struct sta_info {
u8 cell_capa; /* 0 = unknown (not an MBO STA); otherwise,
* enum mbo_cellular_capa values */
struct mbo_non_pref_chan_info *non_pref_chan;
+ int auth_rssi; /* Last Authentication frame RSSI */
#endif /* CONFIG_MBO */
u8 *supp_op_classes; /* Supported Operating Classes element, if