]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HS 2.0: Reject OSU connection for Single SSID case without OSU_NAI
authorJouni Malinen <jouni@codeaurora.org>
Fri, 5 Oct 2018 18:02:29 +0000 (21:02 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 5 Oct 2018 18:03:46 +0000 (21:03 +0300)
The Single SSID case can only use OSEN, so reject the case where OSU_NAI
is not set and open OSU connection would be used since that connection
cannot succeed.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
hs20/client/osu_client.c

index 02bde2f8a826d082058430383006b163c30990f9..17c5ba1b59b40d31cd91d452008aeb07e97441ea 100644 (file)
@@ -2193,6 +2193,10 @@ static int osu_connect(struct hs20_osu_client *ctx, const char *bssid,
                    set_network_quoted(ifname, id, "identity", osu_nai) < 0 ||
                    set_network_quoted(ifname, id, "ca_cert", fname) < 0)
                        return -1;
+       } else if (ssid2) {
+               wpa_printf(MSG_INFO, "No OSU_NAI set for RSN[OSEN]");
+               write_summary(ctx, "No OSU_NAI set for RSN[OSEN]");
+               return -1;
        } else {
                if (set_network(ifname, id, "key_mgmt", "NONE") < 0)
                        return -1;