mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-21 11:52:34 +01:00
wiphy: Sanity check before netdev_disassociated
The lost beacon event can be received when iwd thinks netdev is diconnected if it was connected before iwd started, and then netdev_disassociated will segfault.
This commit is contained in:
parent
2440d4cfd3
commit
692bfa23fe
@ -241,6 +241,7 @@ static void netdev_lost_beacon(struct netdev *netdev)
|
|||||||
dbus_pending_reply(&netdev->connect_pending,
|
dbus_pending_reply(&netdev->connect_pending,
|
||||||
dbus_error_failed(netdev->connect_pending));
|
dbus_error_failed(netdev->connect_pending));
|
||||||
|
|
||||||
|
if (netdev->connected_network)
|
||||||
netdev_disassociated(netdev);
|
netdev_disassociated(netdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user