]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Allow transition_disable updates during the lifetime of a BSS
authorJouni Malinen <jouni@codeaurora.org>
Sun, 7 Jun 2020 14:06:52 +0000 (17:06 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 7 Jun 2020 14:06:52 +0000 (17:06 +0300)
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>
hostapd/ctrl_iface.c
src/ap/wpa_auth.c
src/ap/wpa_auth.h

index 8a79ef7838969a9ea008d422f54d1124e35846f2..b470c5643f9959ffcf744d11c687a9325c447ba2 100644 (file)
@@ -1478,6 +1478,9 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
                           os_strcmp(cmd, "sae_pwe") == 0) {
                        if (hapd->started)
                                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
index 0efa287971e1c138a8d3b8b1ff7bc8c2318a92a9..9e6c0cad3c2925e7707c42c3f418f78b431b351a 100644 (file)
@@ -5288,6 +5288,14 @@ void wpa_auth_set_dpp_z(struct wpa_state_machine *sm, const struct wpabuf *z)
 #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
 
 int wpa_auth_resend_m1(struct wpa_state_machine *sm, int change_anonce,
index 59794a7f9dd364fab278aae1cba7c4b6a9463afc..5f9df9c89bebe98c4446b72452cba703d9abe2c3 100644 (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);
 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_transition_disable(struct wpa_authenticator *wpa_auth,
+                                    u8 val);
 
 int wpa_auth_resend_m1(struct wpa_state_machine *sm, int change_anonce,
                       void (*cb)(void *ctx1, void *ctx2),