openwrt / iwinfo

[MIRROR] Library for accessing wireless device drivers
https://git.openwrt.org/?p=project/iwinfo.git;
GNU General Public License v2.0
6 stars 17 forks source link

WPA-EAP-SHA256 + ieee80211w reported as WPA2 rather than WPA3 #8

Open wryun opened 8 months ago

wryun commented 8 months ago

According to Section 3 of: https://www.wi-fi.org/system/files/WPA3%20Specification%20v3.1.pdf

    wpa_key_mgmt=WPA-EAP WPA-EAP-SHA256
    ieee80211w=1
    => WPA3-Enterprise transition mode

    wpa_key_mgmt=WPA-EAP-SHA256
    ieee80211w=2
    => WPA3-Enterprise only mode

Also: https://github.com/openwrt/openwrt/commit/b63df6ce5d0639e6106967fd445c96518da52afb

However, iwinfo when looking at the hostapd conf file doesn't seem to think something is WPA3 until it gets to WPA-EAP-SHA384 (and doesn't consider the value of ieee80211w at all):

static const struct {
    const char *match;
    int version;
    int suite;
} wpa_key_mgmt_strings[] = {
    { "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 },
    { "None",            0, IWINFO_KMGMT_NONE },
    { "PSK",             0, IWINFO_KMGMT_PSK },
    { "EAP",             0, IWINFO_KMGMT_8021x },
    { "SAE",             4, IWINFO_KMGMT_SAE },
    { "OWE",             4, IWINFO_KMGMT_OWE }
};

I'm also a bit surprised that iwinfo is even looking at the conf file rather than querying hostapd direclty (as it does with wpa_supplicant); not possible for some reason?

nasbdh9 commented 4 months ago

I have the same issue, when setting option encryption 'wpa3+ccmp' iwinfo does not check sae and wpa_key_mgmt related options, still reports as wpa2