From: Tjeu Kayim <15987676+tjeuka...@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+tjeuka...@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 --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[] = {
-- 
2.25.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to