]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Report authentication algorithm in STA MIB
authorSai Pratyusha Magam <smagam@qti.qualcomm.com>
Thu, 13 Nov 2025 11:33:40 +0000 (17:03 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 25 Nov 2025 12:42:04 +0000 (14:42 +0200)
The new "auth_alg" entry in hostapd "STA <addr>" control interface
output can be used to determine the authentication algorithm used by the
non-AP STA to authenticate with the AP.

Signed-off-by: Sai Pratyusha Magam <smagam@qti.qualcomm.com>
src/ap/ieee802_11.c

index 3b21459ada9dbf72596e03ba75774ae6f9475ee7..2df953a00abd2a2aa264d3b0321c6b235104132b 100644 (file)
@@ -7514,8 +7514,16 @@ int ieee802_11_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
 int ieee802_11_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta,
                           char *buf, size_t buflen)
 {
-       /* TODO */
-       return 0;
+       int len = 0, ret;
+
+       ret = os_snprintf(buf + len, buflen - len,
+                         "auth_alg=%d\n",
+                         sta->auth_alg);
+       if (os_snprintf_error(buflen - len, ret))
+               return len;
+       len += ret;
+
+       return len;
 }