]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HS 2.0: Do not indicate HS 2.0 status without WPA2-Enterprise
authorJouni Malinen <j@w1.fi>
Sun, 19 Aug 2012 09:34:14 +0000 (12:34 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 19 Aug 2012 09:54:48 +0000 (12:54 +0300)
Hotspot 2.0 allows only WPA2-Enterprise to be used, so other types of
networks must not be indicated as Hotspot 2.0 networks even if they
(incorrectly) advertise HS 2.0 support.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/ctrl_iface.c

index f591f68920c7fe9fb13c417f23205555634283ad..4fd83b9e92d8118969d30a474257cfe2c726cb4e 100644 (file)
@@ -1124,7 +1124,9 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
 
 #ifdef CONFIG_HS20
        if (wpa_s->current_bss &&
-           wpa_bss_get_vendor_ie(wpa_s->current_bss, HS20_IE_VENDOR_TYPE)) {
+           wpa_bss_get_vendor_ie(wpa_s->current_bss, HS20_IE_VENDOR_TYPE) &&
+           wpa_s->wpa_proto == WPA_PROTO_RSN &&
+           wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt)) {
                ret = os_snprintf(pos, end - pos, "hs20=1\n");
                if (ret < 0 || ret >= end - pos)
                        return pos - buf;
@@ -1623,7 +1625,7 @@ static int wpa_supplicant_ctrl_iface_scan_result(
                pos += ret;
        }
 #ifdef CONFIG_HS20
-       if (wpa_bss_get_vendor_ie(bss, HS20_IE_VENDOR_TYPE)) {
+       if (wpa_bss_get_vendor_ie(bss, HS20_IE_VENDOR_TYPE) && ie2) {
                ret = os_snprintf(pos, end - pos, "[HS20]");
                if (ret < 0 || ret >= end - pos)
                        return -1;