From d1b1f9fa9aaa497d92f2aad351a1d44eccc49d66 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 24 Jul 2019 12:58:49 +0300 Subject: [PATCH] Report WPA/RSN protocol and AKM suite selector in STA MIB The new "wpa" and "AKMSuiteSelector" entries in hostapd "STA " control interface output can be used to determine the negotiated WPA/RSN protocol and AKM suite of an associated station. Signed-off-by: Jouni Malinen --- src/ap/wpa_auth.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c index e1c0c2ccb..c56077001 100644 --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c @@ -4250,8 +4250,12 @@ int wpa_get_mib_sta(struct wpa_state_machine *sm, char *buf, size_t buflen) /* Private MIB */ ret = os_snprintf(buf + len, buflen - len, + "wpa=%d\n" + "AKMSuiteSelector=" RSN_SUITE "\n" "hostapdWPAPTKState=%d\n" "hostapdWPAPTKGroupState=%d\n", + sm->wpa, + RSN_SUITE_ARG(wpa_akm_to_suite(sm->wpa_key_mgmt)), sm->wpa_ptk_state, sm->wpa_ptk_group_state); if (os_snprintf_error(buflen - len, ret))