commit 926dc608af04dbffc187c1f4d9e96a55c477e014
parent 4329b669d0f7f0f9ce0698ddd0ba99a724f9c6fc
Author: James Prestwood <prestwoj@gmail.com>
Date: Wed, 15 Sep 2021 10:36:16 -0700
network: set handshake SSID based on BSS, not network
This is being added to support OWE transition mode. For these
type of networks the OWE BSS may contain a different SSID than
that of the network, but the WFA spec requires this be hidden
from the user. This means we need to set the handshake SSID based
on the BSS rather than the network object.
Diffstat:
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/network.c b/src/network.c
@@ -465,7 +465,7 @@ static int network_set_handshake_secrets_psk(struct network *network,
return 0;
}
-int network_handshake_setup(struct network *network,
+int network_handshake_setup(struct network *network, struct scan_bss *bss,
struct handshake_state *hs)
{
struct station *station = network->station;
@@ -492,8 +492,7 @@ int network_handshake_setup(struct network *network,
return -ENOTSUP;
}
- handshake_state_set_ssid(hs, (void *) network->ssid,
- strlen(network->ssid));
+ handshake_state_set_ssid(hs, bss->ssid, bss->ssid_len);
if (settings && l_settings_get_uint(settings, "EAPoL",
"ProtocolVersion",
diff --git a/src/network.h b/src/network.h
@@ -50,7 +50,7 @@ bool network_set_psk(struct network *network, const uint8_t *psk);
int network_set_transition_disable(struct network *network,
const uint8_t *td, size_t len);
-int network_handshake_setup(struct network *network,
+int network_handshake_setup(struct network *network, struct scan_bss *bss,
struct handshake_state *hs);
void network_sync_settings(struct network *network);
diff --git a/src/station.c b/src/station.c
@@ -935,7 +935,7 @@ static struct handshake_state *station_handshake_setup(struct station *station,
handshake_state_set_authenticator_rsnxe(hs, bss->rsnxe);
- if (network_handshake_setup(network, hs) < 0)
+ if (network_handshake_setup(network, bss, hs) < 0)
goto not_supported;
vendor_ies = network_info_get_extra_ies(info, bss, &iov_elems);