From e0ffd948320d9a3daccadf5e331e62a7011b787a Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Tue, 27 Apr 2021 16:34:51 -0700 Subject: [PATCH] netdev: only call connect_ok in station/p2p_client mode netdev_connect_ok is only for station/p2p_client modes but AP also ends up on the same code path. Check the iftype before calling netdev_connect_ok. --- src/netdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/netdev.c b/src/netdev.c index 7dc41628..4358500c 100644 --- a/src/netdev.c +++ b/src/netdev.c @@ -1352,7 +1352,9 @@ static void try_handshake_complete(struct netdev_handshake_state *nhs) nhs->complete = true; handshake_event(&nhs->super, HANDSHAKE_EVENT_COMPLETE); - netdev_connect_ok(nhs->netdev); + if (nhs->netdev->type == NL80211_IFTYPE_STATION || + nhs->netdev->type == NL80211_IFTYPE_P2P_CLIENT) + netdev_connect_ok(nhs->netdev); } }