Skip to contentSkip to conversation

netdev: set connected to false in netdev_reassociate

PATCH Applied James Prestwood 2 participants 2 messages Apr 30, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netdev: set connected to false in netdev_reassociate

Commit 1fe5070 added a workaround for drivers which may send the connect event prior to the connect callback/ack. This caused IWD to fail to start eapol if reassociation was used due to netdev_reassociate never setting netdev->connected = false.

netdev_reassociate uses the same code path as normal connections, but when the connect callback came in connected was already set to true which then prevents eapol from being registered. Then, once the connect event comes in, there is no frame watch for eapol and IWD doesn't respond to any handshake frames.

---
 src/netdev.c | 1 +
 1 file changed, 1 insertion(+)
src/netdev.c +1 -0
index 7a3f15e3..4fbe813a 100644
@@ -3449,6 +3449,7 @@ int netdev_reassociate(struct netdev *netdev, struct scan_bss *target_bss,
 
 	netdev->associated = false;
 	netdev->operational = false;
+	netdev->connected = false;
 
 	netdev_rssi_polling_update(netdev);
 
Signature · 1 line
2.26.2
#1 lore raw

Hi James,

Quoted 5 lines · James Prestwood

Commit 1fe5070 added a workaround for drivers which may send the connect event prior to the connect callback/ack. This caused IWD to fail to start eapol if reassociation was used due to netdev_reassociate never setting netdev->connected = false.

Quoted 9 lines

netdev_reassociate uses the same code path as normal connections, but when the connect callback came in connected was already set to true which then prevents eapol from being registered. Then, once the connect event comes in, there is no frame watch for eapol and IWD doesn't respond to any handshake frames.

---
  src/netdev.c | 1 +
  1 file changed, 1 insertion(+)

Applied, thanks.

Regards,
-Denis