diff --git a/src/network.c b/src/network.c index d81a201d..4a6cf3ae 100644 --- 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 index 39375703..5451815b 100644 --- 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 index ac741f5a..70961221 100644 --- 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);