wpa_supplicant configuration for Beacon protection

Add a new wpa_supplicant network profile configuration parameter
beacon_prot=<0/1> to allow Beacon protection to be enabled.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-02-18 00:16:55 +02:00 committed by Jouni Malinen
parent 16889aff40
commit ecbf59e693
7 changed files with 15 additions and 0 deletions

View File

@ -2959,6 +2959,7 @@ void wpa_sm_set_config(struct wpa_sm *sm, struct rsn_supp_config *config)
} else { } else {
sm->fils_cache_id_set = 0; sm->fils_cache_id_set = 0;
} }
sm->beacon_prot = config->beacon_prot;
#endif /* CONFIG_FILS */ #endif /* CONFIG_FILS */
} else { } else {
sm->network_ctx = NULL; sm->network_ctx = NULL;
@ -2971,6 +2972,7 @@ void wpa_sm_set_config(struct wpa_sm *sm, struct rsn_supp_config *config)
sm->p2p = 0; sm->p2p = 0;
sm->wpa_rsc_relaxation = 0; sm->wpa_rsc_relaxation = 0;
sm->owe_ptk_workaround = 0; sm->owe_ptk_workaround = 0;
sm->beacon_prot = 0;
} }
} }

View File

@ -115,6 +115,7 @@ struct rsn_supp_config {
int wpa_rsc_relaxation; int wpa_rsc_relaxation;
int owe_ptk_workaround; int owe_ptk_workaround;
const u8 *fils_cache_id; const u8 *fils_cache_id;
int beacon_prot;
}; };
#ifndef CONFIG_NO_WPA #ifndef CONFIG_NO_WPA

View File

@ -64,6 +64,7 @@ struct wpa_sm {
int p2p; int p2p;
int wpa_rsc_relaxation; int wpa_rsc_relaxation;
int owe_ptk_workaround; int owe_ptk_workaround;
int beacon_prot;
u8 own_addr[ETH_ALEN]; u8 own_addr[ETH_ALEN];
const char *ifname; const char *ifname;

View File

@ -2569,6 +2569,7 @@ static const struct parse_data ssid_fields[] = {
{ INT_RANGE(owe_ptk_workaround, 0, 1) }, { INT_RANGE(owe_ptk_workaround, 0, 1) },
{ INT_RANGE(multi_ap_backhaul_sta, 0, 1) }, { INT_RANGE(multi_ap_backhaul_sta, 0, 1) },
{ INT_RANGE(ft_eap_pmksa_caching, 0, 1) }, { INT_RANGE(ft_eap_pmksa_caching, 0, 1) },
{ INT_RANGE(beacon_prot, 0, 1) },
}; };
#undef OFFSET #undef OFFSET

View File

@ -913,6 +913,7 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
INT(owe_ptk_workaround); INT(owe_ptk_workaround);
INT(multi_ap_backhaul_sta); INT(multi_ap_backhaul_sta);
INT(ft_eap_pmksa_caching); INT(ft_eap_pmksa_caching);
INT(beacon_prot);
#ifdef CONFIG_HT_OVERRIDES #ifdef CONFIG_HT_OVERRIDES
INT_DEF(disable_ht, DEFAULT_DISABLE_HT); INT_DEF(disable_ht, DEFAULT_DISABLE_HT);
INT_DEF(disable_ht40, DEFAULT_DISABLE_HT40); INT_DEF(disable_ht40, DEFAULT_DISABLE_HT40);

View File

@ -1047,6 +1047,14 @@ struct wpa_ssid {
* FT initial mobility domain association. * FT initial mobility domain association.
*/ */
int ft_eap_pmksa_caching; int ft_eap_pmksa_caching;
/**
* beacon_prot - Whether Beacon protection is enabled
*
* This depends on management frame protection (ieee80211w) being
* enabled.
*/
int beacon_prot;
}; };
#endif /* CONFIG_SSID_H */ #endif /* CONFIG_SSID_H */

View File

@ -1309,6 +1309,7 @@ void wpa_supplicant_rsn_supp_set_config(struct wpa_supplicant *wpa_s,
conf.fils_cache_id = conf.fils_cache_id =
wpa_bss_get_fils_cache_id(wpa_s->current_bss); wpa_bss_get_fils_cache_id(wpa_s->current_bss);
#endif /* CONFIG_FILS */ #endif /* CONFIG_FILS */
conf.beacon_prot = ssid->beacon_prot;
} }
wpa_sm_set_config(wpa_s->wpa, ssid ? &conf : NULL); wpa_sm_set_config(wpa_s->wpa, ssid ? &conf : NULL);
} }