3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-26 01:02:35 +01:00

netdev: fix segfault due to roaming before connected

In this situation the kernel is sending a low RSSI event which netdev
picks up, but since we set netdev->connected so early the event is
forwarded to station before IWD has fully connected. Station then
tries to get a neighbor report, which may fail and cause a known
frequency scan. If this is a new network the frequency scan tries to
get any known frequencies in network_info which will be unset and
cause a segfault.

This can be avoided by only sending RSSI events when netdev->operational
is set rather than netdev->connected.
This commit is contained in:
James Prestwood 2020-05-04 14:30:55 -07:00 committed by Denis Kenzior
parent 7641782924
commit 3f2c84c2a2

View File

@ -678,7 +678,7 @@ static void netdev_cqm_event_rssi_threshold(struct netdev *netdev,
{
int event;
if (!netdev->connected)
if (!netdev->operational)
return;
if (rssi_event != NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW &&