diff mbox series

iwinfo: Add missing auth_suites mappings for WPA3

Message ID DBBPR08MB626525F80F810F5F36B0F8B5CB969@DBBPR08MB6265.eurprd08.prod.outlook.com
State Accepted
Delegated to: Hauke Mehrtens
Headers show
Series iwinfo: Add missing auth_suites mappings for WPA3 | expand

Commit Message

hasbaddana@outlook.com July 28, 2022, 8:47 a.m. UTC
From: Tjeu Kayim <15987676+TjeuKayim@users.noreply.github.com>

`iwinfo.h` says:
    #define IWINFO_KMGMT_COUNT   5
    ...
    extern const char *IWINFO_KMGMT_NAMES[IWINFO_KMGMT_COUNT];

Though only only 3 items are defined. The other two were forgotten
when adding WPA3 support. The `auth_suites` table exposed via Lua
never included the items "SAE" and "OWE" until this commit.

Signed-off-by: Tjeu Kayim <15987676+TjeuKayim@users.noreply.github.com>
---

Notes:
    Tested with OpenWRT v21.02.3 and iwinfo commit
    c45f0b584b4b86f8250f90ea19afca271c114fa2.
    
    Fortunately, `lua_pushstring` gracefully handled passing NULL, so the
    previous code didn't cause any errors. This commit just fixes the
    inconsistency that "SAE" and "OWE" are included in the iwinfo CLI output
    and the Lua `description` (in `iwinfo_crypto_print_suites()`), but not
    in the Lua `auth_suites`.
    
    This is probably not important enough to add it to openwrt/package
    /network/utils/iwinfo/patches, so that's why I didn't use a GitHub pull
    request.

 iwinfo_lib.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/iwinfo_lib.c b/iwinfo_lib.c
index 70b080c..118fe58 100644
--- a/iwinfo_lib.c
+++ b/iwinfo_lib.c
@@ -37,6 +37,8 @@  const char *IWINFO_KMGMT_NAMES[] = {
 	"NONE",
 	"802.1X",
 	"PSK",
+	"SAE",
+	"OWE",
 };
 
 const char *IWINFO_AUTH_NAMES[] = {