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.
This commit is contained in:
Andrew Zaborowski 2018-10-20 05:21:28 +02:00 committed by Thomas Haller
parent 75d53cc9fc
commit 7f5957c8a7

View file

@ -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));
}