commit e0ffd948320d9a3daccadf5e331e62a7011b787a
parent e148e1ea99fbbed17f26863a8a9f284708c072da
Author: James Prestwood <prestwoj@gmail.com>
Date: Tue, 27 Apr 2021 16:34:51 -0700
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.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git 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);
}
}