summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Zaborowski <andrew.zaborowski@intel.com>2018-10-20 05:21:28 +0200
committerThomas Haller <thaller@redhat.com>2018-10-23 11:32:28 +0200
commit7f5957c8a73448f8d0916f68af4a7002005628fa (patch)
tree87e706ef0819d567a4bd8bdc973b27432bb7b314
parent75d53cc9fc396358b6cf1360350ab73cbe398a4f (diff)
downloadNetworkManager-7f5957c8a73448f8d0916f68af4a7002005628fa.tar.gz
wifi/iwd: check priv->dbus_obj in is_available
is_available would recently return true after IWD had disconnected if a connection was active because it would check that priv->dbus_station_proxy was non-NULL (i.e. that the DBus interface was still visible, which it wasn't) but that check would be overridden if the NMDevice state was activated. Now require priv->dbus_obj to be non-NULL, which would even be enough on its own although I'm leaving the previous check there too to catch potential IWD states we don't support in which priv->dbus_station_proxy is NULL without an active connection.
-rw-r--r--src/devices/wifi/nm-device-iwd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/devices/wifi/nm-device-iwd.c b/src/devices/wifi/nm-device-iwd.c
index 8fb1f269e5..8ab0ba6968 100644
--- a/src/devices/wifi/nm-device-iwd.c
+++ b/src/devices/wifi/nm-device-iwd.c
@@ -952,7 +952,8 @@ is_available (NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
* We call nm_device_queue_recheck_available whenever
* priv->enabled changes or priv->dbus_station_proxy changes.
*/
- return priv->enabled
+ return priv->dbus_obj
+ && priv->enabled
&& ( priv->dbus_station_proxy
|| (state >= NM_DEVICE_STATE_CONFIG && state <= NM_DEVICE_STATE_DEACTIVATING));
}