summaryrefslogtreecommitdiff
path: root/src/supplicant/nm-supplicant-interface.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-12-10 11:50:18 +0100
committerThomas Haller <thaller@redhat.com>2020-12-10 12:01:12 +0100
commit8cadfed2fe3540c04572fec283bdf09e14113192 (patch)
tree2b046157d03abf0d5f35cf2d6170b9abdaa6c2b9 /src/supplicant/nm-supplicant-interface.c
parentb012877445bddd772eec79e3ce38f93cc40de720 (diff)
wifi: fix evaluating the scanning state for wpa-supplicant
wpa_supplicant has a property "scanning" and a "state=scanning". Previously, NetworkManager considered both parts to indicate whether supplicant is currently scanning (if either the property or the state indicated scanning, it took that as indication for scanning). If NetworkManager thinks that supplicant is scanning, it suppresses explicit "Scan" requests. That alone is not severe, because the "Scan" request is only to trigger a scan in supplicant (which supplicant possibly is already doing in state "scanning"). However, what is severe is that NetworkManager will also block autoconnect while supplicant is scanning. That is because NetworkManager wants to get a complete scan result before deciding which network to connect to. It seems that wpa_supplicant can get into "state=scanning" and stay there indefinitely. This prevents NetworkManager from autoactivating a profile. Fix that, to only honor the "scanning" property. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/597 Fixes: b83f07916a54 ('supplicant: large rework of wpa_supplicant handling')
Diffstat (limited to 'src/supplicant/nm-supplicant-interface.c')
-rw-r--r--src/supplicant/nm-supplicant-interface.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c
index d3558a3331..611372d5da 100644
--- a/src/supplicant/nm-supplicant-interface.c
+++ b/src/supplicant/nm-supplicant-interface.c
@@ -457,9 +457,7 @@ _notify_maybe_scanning(NMSupplicantInterface *self)
NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE(self);
gboolean scanning;
- scanning =
- nm_supplicant_interface_state_is_operational(priv->state)
- && (priv->scanning_property || priv->supp_state == NM_SUPPLICANT_INTERFACE_STATE_SCANNING);
+ scanning = nm_supplicant_interface_state_is_operational(priv->state) && priv->scanning_property;
if (priv->scanning_cached == scanning)
return;