From: Jouni Malinen Date: Sun, 18 Dec 2022 18:34:24 +0000 (+0200) Subject: Make MFPR value from an associated STA available as hostapdMFPR X-Git-Tag: hostap_2_11~1359 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a2d2755223a021be64648ee30ac15d47839de6a;p=thirdparty%2Fhostap.git Make MFPR value from an associated STA available as hostapdMFPR This can be helpful for testing purposes. Signed-off-by: Jouni Malinen --- diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c index d9acf101d..5fde990ea 100644 --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c @@ -4830,11 +4830,13 @@ int wpa_get_mib_sta(struct wpa_state_machine *sm, char *buf, size_t buflen) "wpa=%d\n" "AKMSuiteSelector=" RSN_SUITE "\n" "hostapdWPAPTKState=%d\n" - "hostapdWPAPTKGroupState=%d\n", + "hostapdWPAPTKGroupState=%d\n" + "hostapdMFPR=%d\n", sm->wpa, RSN_SUITE_ARG(wpa_akm_to_suite(sm->wpa_key_mgmt)), sm->wpa_ptk_state, - sm->wpa_ptk_group_state); + sm->wpa_ptk_group_state, + sm->mfpr); if (os_snprintf_error(buflen - len, ret)) return len; len += ret; diff --git a/src/ap/wpa_auth_i.h b/src/ap/wpa_auth_i.h index 99a95abfd..7ed3f2b6b 100644 --- a/src/ap/wpa_auth_i.h +++ b/src/ap/wpa_auth_i.h @@ -86,6 +86,7 @@ struct wpa_state_machine { unsigned int pending_deinit:1; unsigned int started:1; unsigned int mgmt_frame_prot:1; + unsigned int mfpr:1; unsigned int rx_eapol_key_secure:1; unsigned int update_snonce:1; unsigned int alt_snonce_valid:1; diff --git a/src/ap/wpa_auth_ie.c b/src/ap/wpa_auth_ie.c index 89d4a3ca0..43ccec9be 100644 --- a/src/ap/wpa_auth_ie.c +++ b/src/ap/wpa_auth_ie.c @@ -884,6 +884,7 @@ wpa_validate_wpa_ie(struct wpa_authenticator *wpa_auth, sm->mgmt_frame_prot = 0; else sm->mgmt_frame_prot = 1; + sm->mfpr = !!(data.capabilities & WPA_CAPABILITY_MFPR); if (sm->mgmt_frame_prot && (ciphers & WPA_CIPHER_TKIP)) { wpa_printf(MSG_DEBUG,