mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-05-06 09:27:25 +02:00
netdev: Start eapol earlier
This commit is contained in:
parent
5329ddceb8
commit
a6cad89fbe
20
src/netdev.c
20
src/netdev.c
@ -1009,12 +1009,7 @@ static void netdev_connect_event(struct l_genl_msg *msg,
|
|||||||
if (!status_code || *status_code != 0)
|
if (!status_code || *status_code != 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (netdev->sm) {
|
if (netdev->eapol_active) {
|
||||||
eapol_start(netdev->index, netdev->sm);
|
|
||||||
netdev->eapol_active = true;
|
|
||||||
|
|
||||||
netdev->sm = NULL;
|
|
||||||
|
|
||||||
if (netdev->event_filter)
|
if (netdev->event_filter)
|
||||||
netdev->event_filter(netdev,
|
netdev->event_filter(netdev,
|
||||||
NETDEV_EVENT_4WAY_HANDSHAKE,
|
NETDEV_EVENT_4WAY_HANDSHAKE,
|
||||||
@ -1055,6 +1050,19 @@ static void netdev_cmd_connect_cb(struct l_genl_msg *msg, void *user_data)
|
|||||||
NETDEV_EVENT_ASSOCIATING,
|
NETDEV_EVENT_ASSOCIATING,
|
||||||
netdev->user_data);
|
netdev->user_data);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We start the eapol state machine here, in case the PAE
|
||||||
|
* socket receives EAPoL packets before the nl80211 socket
|
||||||
|
* receives the connected event. The logical sequence of
|
||||||
|
* events can be reversed (e.g. connect_event, then PAE data)
|
||||||
|
* due to scheduling
|
||||||
|
*/
|
||||||
|
if (netdev->sm) {
|
||||||
|
eapol_start(netdev->index, netdev->sm);
|
||||||
|
netdev->eapol_active = true;
|
||||||
|
netdev->sm = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user