diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2020-06-17 10:01:07 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2020-06-22 09:38:12 +0200 |
commit | 4aefad567387cf11c460f77beeb9f05bd05e46c0 (patch) | |
tree | d45c6b6a156cd5707af9a2140bcb77359ef2db54 | |
parent | fd34fe50a2100ce5d9440047ec65f25097cb6a32 (diff) | |
download | NetworkManager-4aefad567387cf11c460f77beeb9f05bd05e46c0.tar.gz |
settings: fix assertion when updating default wired connectionbg/issue471
The connection is expected to have the NM_GENERATED flag, since it has
a default wired device.
Fixes: d35d3c468a30 ('settings: rework tracking settings connections and settings plugins')
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/471
-rw-r--r-- | src/settings/nm-settings.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index 5899b07945..0a1e7b47d6 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -1996,11 +1996,10 @@ nm_settings_update_connection (NMSettings *self, */ device = nm_settings_connection_default_wired_get_device (sett_conn); if (device) { + nm_assert (cur_in_memory); - nm_assert (!NM_FLAGS_ANY (nm_settings_connection_get_flags (sett_conn), - NM_SETTINGS_CONNECTION_INT_FLAGS_NM_GENERATED - | NM_SETTINGS_CONNECTION_INT_FLAGS_VOLATILE - | NM_SETTINGS_CONNECTION_INT_FLAGS_EXTERNAL)); + nm_assert (NM_FLAGS_HAS (nm_settings_connection_get_flags (sett_conn), + NM_SETTINGS_CONNECTION_INT_FLAGS_NM_GENERATED)); default_wired_clear_tag (self, device, sett_conn, FALSE); |