Allow transition_disable updates during the lifetime of a BSS

This is mainly for testing purposes to allow more convenient checking of
station behavior when a transition mode is disabled.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-06-07 17:06:52 +03:00 committed by Jouni Malinen
parent 6d72833236
commit 0c4ffce464
3 changed files with 13 additions and 0 deletions

View File

@ -1478,6 +1478,9 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
os_strcmp(cmd, "sae_pwe") == 0) { os_strcmp(cmd, "sae_pwe") == 0) {
if (hapd->started) if (hapd->started)
hostapd_setup_sae_pt(hapd->conf); hostapd_setup_sae_pt(hapd->conf);
} else if (os_strcasecmp(cmd, "transition_disable") == 0) {
wpa_auth_set_transition_disable(hapd->wpa_auth,
hapd->conf->transition_disable);
} }
#ifdef CONFIG_TESTING_OPTIONS #ifdef CONFIG_TESTING_OPTIONS

View File

@ -5288,6 +5288,14 @@ void wpa_auth_set_dpp_z(struct wpa_state_machine *sm, const struct wpabuf *z)
#endif /* CONFIG_DPP2 */ #endif /* CONFIG_DPP2 */
void wpa_auth_set_transition_disable(struct wpa_authenticator *wpa_auth,
u8 val)
{
if (wpa_auth)
wpa_auth->conf.transition_disable = val;
}
#ifdef CONFIG_TESTING_OPTIONS #ifdef CONFIG_TESTING_OPTIONS
int wpa_auth_resend_m1(struct wpa_state_machine *sm, int change_anonce, int wpa_auth_resend_m1(struct wpa_state_machine *sm, int change_anonce,

View File

@ -517,6 +517,8 @@ u8 * wpa_auth_write_assoc_resp_fils(struct wpa_state_machine *sm,
const u8 *req_ies, size_t req_ies_len); const u8 *req_ies, size_t req_ies_len);
void wpa_auth_set_auth_alg(struct wpa_state_machine *sm, u16 auth_alg); void wpa_auth_set_auth_alg(struct wpa_state_machine *sm, u16 auth_alg);
void wpa_auth_set_dpp_z(struct wpa_state_machine *sm, const struct wpabuf *z); void wpa_auth_set_dpp_z(struct wpa_state_machine *sm, const struct wpabuf *z);
void wpa_auth_set_transition_disable(struct wpa_authenticator *wpa_auth,
u8 val);
int wpa_auth_resend_m1(struct wpa_state_machine *sm, int change_anonce, int wpa_auth_resend_m1(struct wpa_state_machine *sm, int change_anonce,
void (*cb)(void *ctx1, void *ctx2), void (*cb)(void *ctx1, void *ctx2),