All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] station: Fix autoconnect loops
@ 2021-05-10  9:00 Andrew Zaborowski
  0 siblings, 0 replies; only message in thread
From: Andrew Zaborowski @ 2021-05-10  9:00 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

Make sure we process the result of a connect attempt both in a D-Bus
triggered connection and during autoconnect.  Until now we'd only call
station_connect_cb() on NETDEV_EVENT_DISCONNECT_BY_{AP,SME} if
station->connect_pending was non-NULL, i.e. only in the D-Bus method.
As a result we were never blacklisting BSSes and never calling
network_connect_failed() (to set ask_passphrase) during autoconnect.
---
 src/station.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/station.c b/src/station.c
index 479f81f5..aba16c83 100644
--- a/src/station.c
+++ b/src/station.c
@@ -1370,7 +1370,8 @@ static void station_disconnect_event(struct station *station, void *event_data)
 {
 	l_debug("%u", netdev_get_ifindex(station->netdev));
 
-	if (station->connect_pending)
+	if (station->connect_pending ||
+			station->state == STATION_STATE_CONNECTING)
 		station_connect_cb(station->netdev,
 					NETDEV_RESULT_HANDSHAKE_FAILED,
 					event_data, station);
-- 
2.27.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-10  9:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10  9:00 [PATCH] station: Fix autoconnect loops Andrew Zaborowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.