Allow AP's behavior for BSS Max Idle Period management to be configured.
Previously, this was automatically enabled for all CONFIG_WNM_AP=y
builds. This can now be changed with the new hostapd configuration
parameter bss_max_idle:
0 = BSS Max Idle Period management disabled
1 = BSS Max Idle Period management enabled
(default and the previous behavior)
2 = BSS Max Idle Period management enabled with requirement for
protected keep-alive frames
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
bss->ap_max_inactivity = atoi(pos);
} else if (os_strcmp(buf, "skip_inactivity_poll") == 0) {
bss->skip_inactivity_poll = atoi(pos);
+ } else if (os_strcmp(buf, "bss_max_idle") == 0) {
+ int val = atoi(pos);
+
+ if (val < 0 || val > 2) {
+ wpa_printf(MSG_ERROR,
+ "Line %d: Invalid bss_max_idle value", line);
+ return 1;
+ }
+ bss->bss_max_idle = val;
} else if (os_strcmp(buf, "config_id") == 0) {
os_free(bss->config_id);
bss->config_id = os_strdup(pos);
# even if they are still in range of the AP. This can be done by setting
# skip_inactivity_poll to 1 (default 0).
#skip_inactivity_poll=0
+#
+# BSS max idle period management
+# 0 = disabled (do not advertise and manage BSS max idle period)
+# 1 = enabled (advertise and manage BSS max idle period; default)
+# 2 = enabled requiring protected frames (advertise and manage BSS max idle
+# period and require STAs to use protected keep-alive frames)
+#bss_max_idle=1
# Disassociate stations based on excessive transmission failures or other
# indications of connection loss. This depends on the driver capabilities and
bss->eap_sim_id = 3;
bss->eap_sim_aka_fast_reauth_limit = 1000;
bss->ap_max_inactivity = AP_MAX_INACTIVITY;
+ bss->bss_max_idle = 1;
bss->eapol_version = EAPOL_VERSION;
bss->max_listen_interval = 65535;
*/
int ap_max_inactivity;
+ int bss_max_idle;
int ignore_broadcast_ssid;
int no_probe_resp_if_max_sta;
u8 *pos = eid;
#ifdef CONFIG_WNM_AP
- if (hapd->conf->ap_max_inactivity > 0) {
+ if (hapd->conf->ap_max_inactivity > 0 &&
+ hapd->conf->bss_max_idle) {
unsigned int val;
*pos++ = WLAN_EID_BSS_MAX_IDLE_PERIOD;
*pos++ = 3;
val = 65535;
WPA_PUT_LE16(pos, val);
pos += 2;
- *pos++ = 0x00; /* TODO: Protected Keep-Alive Required */
+ /* Set the Protected Keep-Alive Required bit based on
+ * configuration */
+ *pos++ = hapd->conf->bss_max_idle == 2 ? BIT(0) : 0x00;
}
#endif /* CONFIG_WNM_AP */