Skip to contentSkip to conversation

netdev: prevent crash with open networks

PATCH Applied James Prestwood 2 participants 2 messages Mar 22, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netdev: prevent crash with open networks

The SAE offload changes assumed a handshake object would exist in netdev, which is not the case for open networks.

---
 src/netdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/netdev.c +1 -1
index 0cd139c2..8d3f4a08 100644
@@ -1213,7 +1213,7 @@ static void netdev_connect_ok(struct netdev *netdev)
 	}
 
 	/* Allow station to sync the PSK to disk */
-	if (netdev->handshake->offload)
+	if (netdev->handshake && netdev->handshake->offload)
 		handshake_event(netdev->handshake,
 				HANDSHAKE_EVENT_SETTING_KEYS);
 
Signature · 1 line
2.26.2
#1 lore raw

Hi James,

Quoted 6 lines · James Prestwood

The SAE offload changes assumed a handshake object would exist in netdev, which is not the case for open networks.

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

Applied, thanks.

Regards,
-Denis