mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 04:32:37 +01:00
station: update logic for handshake failure
After adding the NETDEV_RESULT_DISCONNECTED enum, handshake failures initiated by the AP come in via this result so the existing logic to call network_connect_failed() was broken. We could still get a handshake failure generated internally, so that has been preserved (via NETDEV_RESULT_HANDSHAKE_FAILED) but a check for a 4-way handshake timeout reason code was also added.
This commit is contained in:
parent
906afefbf3
commit
22f238706c
@ -3368,7 +3368,13 @@ static void station_connect_cb(struct netdev *netdev, enum netdev_result result,
|
||||
continue_autoconnect = station->state == STATION_STATE_CONNECTING_AUTO;
|
||||
|
||||
if (station->state == STATION_STATE_CONNECTING) {
|
||||
bool during_eapol = result == NETDEV_RESULT_HANDSHAKE_FAILED;
|
||||
/*
|
||||
* Either a handshake failure (generated internally) or a 4-way
|
||||
* handshake timeout should trigger the PSK to be asked for
|
||||
* again. Set during_eapol accordingly.
|
||||
*/
|
||||
bool during_eapol = result == NETDEV_RESULT_HANDSHAKE_FAILED ||
|
||||
reason == MMPDU_REASON_CODE_4WAY_HANDSHAKE_TIMEOUT;
|
||||
network_connect_failed(station->connected_network,
|
||||
during_eapol);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user