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: 4229c97012 ('iwd: Mirror NM connections to IWD network config files'):
This commit is contained in:
Jonas Dreßler 2021-04-25 11:15:36 +02:00 committed by Thomas Haller
parent b9929b647b
commit c8608d7cc3
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -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),