From c8608d7cc3ff11919d7c8ea8f68de9b3db714aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Sun, 25 Apr 2021 11:15:36 +0200 Subject: [PATCH] iwd: Correctly compare autoconnected states Quite obviously, we want to update the AutoConnect setting of the iwd network in case the NM and iwd settings differ, not if they are the same. So check for unequality here instead of equality, which fixes the AutoConnect setting's synchronization. Fixes: 4229c9701278 ('iwd: Mirror NM connections to IWD network config files'): --- src/core/devices/wifi/nm-iwd-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/devices/wifi/nm-iwd-manager.c b/src/core/devices/wifi/nm-iwd-manager.c index 20a1703adb..36c3ac826f 100644 --- a/src/core/devices/wifi/nm-iwd-manager.c +++ b/src/core/devices/wifi/nm-iwd-manager.c @@ -491,7 +491,7 @@ sett_conn_changed(NMSettingsConnection * sett_conn, gboolean nm_autoconnectable = nm_setting_connection_get_autoconnect(s_conn); gboolean iwd_autoconnectable = get_property_bool(data->known_network, "AutoConnect", TRUE); - if (iwd_autoconnectable == nm_autoconnectable) { + if (iwd_autoconnectable != nm_autoconnectable) { nm_log_dbg(LOGD_WIFI, "iwd: updating AutoConnect on known network at %s based on connection %s", g_dbus_proxy_get_object_path(data->known_network),