mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-05 12:52:37 +01:00
netdev: better handle associate timeouts with auth_protos
Any auth proto which did not implement the assoc_timeout handler could end up getting 'stuck' forever if there was an associate timeout. This is because in the event of an associate timeout IWD only sets a few flags and relies on the connect event to actually handle the failure. The problem is a connect event never comes if the failure was a timeout. To fix this we can explicitly fail the connection if the auth proto has not implemented assoc_timeout or if it returns false.
This commit is contained in:
parent
28a7dd7fba
commit
90485cb2ee
10
src/netdev.c
10
src/netdev.c
@ -2280,7 +2280,15 @@ static void netdev_associate_event(struct l_genl_msg *msg,
|
|||||||
if (auth_proto_assoc_timeout(netdev->ap))
|
if (auth_proto_assoc_timeout(netdev->ap))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
goto assoc_failed;
|
/*
|
||||||
|
* There will be no connect event when Associate times
|
||||||
|
* out. The failed connection must be explicitly
|
||||||
|
* initiated here.
|
||||||
|
*/
|
||||||
|
netdev_connect_failed(netdev,
|
||||||
|
NETDEV_RESULT_ASSOCIATION_FAILED,
|
||||||
|
status_code);
|
||||||
|
return;
|
||||||
|
|
||||||
case NL80211_ATTR_FRAME:
|
case NL80211_ATTR_FRAME:
|
||||||
frame = data;
|
frame = data;
|
||||||
|
Loading…
Reference in New Issue
Block a user