]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd configuration for Beacon protection
authorJouni Malinen <jouni@codeaurora.org>
Mon, 17 Feb 2020 20:54:23 +0000 (22:54 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 17 Feb 2020 21:48:24 +0000 (23:48 +0200)
Add a new hostapd configuration parameter beacon_prot=<0/1> to allow
Beacon protection to be enabled.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
hostapd/config_file.c
hostapd/hostapd.conf
src/ap/ap_config.h
src/ap/wpa_auth.h
src/ap/wpa_auth_glue.c

index 3d7c3ced7fec95daf49c0b029c0fd6fe7492012e..3e9f17bf4aca6b9ade88864975b4e554d02e92af 100644 (file)
@@ -3400,6 +3400,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
                                   line, pos);
                        return 1;
                }
+       } else if (os_strcmp(buf, "beacon_prot") == 0) {
+               bss->beacon_prot = atoi(pos);
        } else if (os_strcmp(buf, "assoc_sa_query_max_timeout") == 0) {
                bss->assoc_sa_query_max_timeout = atoi(pos);
                if (bss->assoc_sa_query_max_timeout == 0) {
index 395ddfa00bf9eafa0e83aaddb966e541e6a2196e..0433fed8a75a741ef981d4634822401daaeecb04 100644 (file)
@@ -1678,6 +1678,12 @@ own_ip_addr=127.0.0.1
 # available in deployed devices.
 #group_mgmt_cipher=AES-128-CMAC
 
+# Beacon Protection (management frame protection for Beacon frames)
+# This depends on management frame protection being enabled (ieee80211w != 0).
+# 0 = disabled (default)
+# 1 = enabled
+#beacon_prot=0
+
 # Association SA Query maximum timeout (in TU = 1.024 ms; for MFP)
 # (maximum time to wait for a SA Query response)
 # dot11AssociationSAQueryMaximumTimeout, 1...4294967295
index e603605b176787a18b568728b64096cae2deeaa7..ca9ae14cda9cbecebf0706a2359b0b70f06c44fd 100644 (file)
@@ -349,6 +349,7 @@ struct hostapd_bss_config {
        int wpa_key_mgmt;
        enum mfp_options ieee80211w;
        int group_mgmt_cipher;
+       int beacon_prot;
        /* dot11AssociationSAQueryMaximumTimeout (in TUs) */
        unsigned int assoc_sa_query_max_timeout;
        /* dot11AssociationSAQueryRetryTimeout (in TUs) */
index 437719b17ccefe2d115fe73875ea69d566ce56ea..c066d997989f7d426731a7aaaa037fae5debcc57 100644 (file)
@@ -188,6 +188,7 @@ struct wpa_auth_config {
        int okc;
        int tx_status;
        enum mfp_options ieee80211w;
+       int beacon_prot;
        int group_mgmt_cipher;
        int sae_require_mfp;
 #ifdef CONFIG_OCV
index 894c1a1b24d7a95f34e4dc1f3e97df02484867ca..7dc4c8e6b590a8b69b1000445f25e387dff388a9 100644 (file)
@@ -67,6 +67,7 @@ static void hostapd_wpa_auth_conf(struct hostapd_bss_config *conf,
 #endif /* CONFIG_OCV */
        wconf->okc = conf->okc;
        wconf->ieee80211w = conf->ieee80211w;
+       wconf->beacon_prot = conf->beacon_prot;
        wconf->group_mgmt_cipher = conf->group_mgmt_cipher;
        wconf->sae_require_mfp = conf->sae_require_mfp;
 #ifdef CONFIG_IEEE80211R_AP