[PATCH] Correctly identify key management algorithms starting with "FT-"

Joerg Werner schreibubi at gmail.com
Sun Aug 28 08:21:20 PDT 2022


Correctly categorize FT-EAP-SHA384 as WPA3

Signed-off-by: Joerg Werner <schreibubi at gmail.com>
---
 iwinfo_nl80211.c | 4 ++++
 iwinfo_utils.c   | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index 30da680..5f213e6 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -1656,6 +1656,7 @@ static struct {
 	{ "IEEE 802.1X/EAP", 0, IWINFO_KMGMT_8021x },
 	{ "EAP-SUITE-B-192", 4, IWINFO_KMGMT_8021x },
 	{ "EAP-SUITE-B",     4, IWINFO_KMGMT_8021x },
+	{ "EAP-SHA384",      4, IWINFO_KMGMT_8021x },
 	{ "EAP-SHA256",      0, IWINFO_KMGMT_8021x },
 	{ "PSK-SHA256",      0, IWINFO_KMGMT_PSK },
 	{ "NONE",            0, IWINFO_KMGMT_NONE },
@@ -1841,6 +1842,9 @@ static int nl80211_get_encryption(const char *ifname, char *buf)
 				if (!strncmp(p, "WPA-", 4))
 					p += 4;
 
+				if (!strncmp(p, "FT-", 3))
+					p += 3;
+
 				parse_wpa_suites(p, atoi(wpa), &c->wpa_version, &c->auth_suites);
 			}
 
diff --git a/iwinfo_utils.c b/iwinfo_utils.c
index f5eb398..c15b305 100644
--- a/iwinfo_utils.c
+++ b/iwinfo_utils.c
@@ -428,11 +428,11 @@ void iwinfo_parse_rsn(struct iwinfo_crypto_entry *c, uint8_t *data, uint8_t len,
 
 				case 11: /* 802.1x Suite-B */
 				case 12: /* 802.1x Suite-B-192 */
+				case 13: /* FT/802.1x SHA-384 */
 					c->wpa_version |= 4;
 					c->auth_suites |= IWINFO_KMGMT_8021x;
 					break;
 
-				case 13: /* FT/802.1x SHA-384 */
 				case 14: /* FILS SHA-256 */
 				case 15: /* FILS SHA-384 */
 				case 16: /* FT/FILS SHA-256 */
-- 
2.37.2




More information about the openwrt-devel mailing list