mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
netdev: fix CMD_ROAM for open networks
In the FW scan callback eapol was being stared unconditionally which isn't correct as roaming on open networks is possible. Instead check that a SM exists just like is done in netdev_connect_event.
This commit is contained in:
parent
44625373bc
commit
81e3dc6ae6
18
src/netdev.c
18
src/netdev.c
@ -4107,9 +4107,7 @@ static bool netdev_get_fw_scan_cb(int err, struct l_queue *bss_list,
|
||||
|
||||
if (err < 0) {
|
||||
l_error("Failed to get scan after roam (%d)", err);
|
||||
netdev_connect_failed(netdev, NETDEV_RESULT_ABORTED,
|
||||
MMPDU_REASON_CODE_UNSPECIFIED);
|
||||
return false;
|
||||
goto failed;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -4121,18 +4119,24 @@ static bool netdev_get_fw_scan_cb(int err, struct l_queue *bss_list,
|
||||
|
||||
if (!bss) {
|
||||
l_error("Roam target BSS not found in scan results");
|
||||
netdev_connect_failed(netdev, NETDEV_RESULT_ABORTED,
|
||||
MMPDU_REASON_CODE_UNSPECIFIED);
|
||||
return false;
|
||||
goto failed;
|
||||
}
|
||||
|
||||
netdev->fw_roam_bss = bss;
|
||||
|
||||
handshake_state_set_authenticator_ie(netdev->handshake, bss->rsne);
|
||||
|
||||
eapol_start(netdev->sm);
|
||||
if (netdev->sm) {
|
||||
if (!eapol_start(netdev->sm))
|
||||
goto failed;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
failed:
|
||||
netdev_connect_failed(netdev, NETDEV_RESULT_ABORTED,
|
||||
MMPDU_REASON_CODE_UNSPECIFIED);
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user