summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-11-05 10:03:21 +0100
committerThomas Haller <thaller@redhat.com>2020-11-09 17:53:16 +0100
commit46e0a3374b39f40213b20a665c2313b2d08a947f (patch)
treed9d835d602a209098f45ddd637060a86208eb96e
parentd75c31afd02b0b68bb925109d146c95150474035 (diff)
downloadNetworkManager-46e0a3374b39f40213b20a665c2313b2d08a947f.tar.gz
core/trivial: add FIXME comment about immutable applied-connection
-rw-r--r--src/devices/nm-device.c2
-rw-r--r--src/devices/ovs/nm-ovsdb.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index b77d0fd36a..b905855cf5 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -12557,6 +12557,8 @@ check_and_reapply_connection(NMDevice * self,
con_old = applied_clone = nm_simple_connection_new_clone(applied);
con_new = applied;
+ /* FIXME(applied-connection-immutable): we should not modify the applied
+ * connection but replace it with a new (immutable) instance. */
nm_connection_replace_settings_from_connection(applied, connection_clean);
nm_connection_clear_secrets(applied);
} else
diff --git a/src/devices/ovs/nm-ovsdb.c b/src/devices/ovs/nm-ovsdb.c
index f3ef54a1b0..56b7421182 100644
--- a/src/devices/ovs/nm-ovsdb.c
+++ b/src/devices/ovs/nm-ovsdb.c
@@ -216,6 +216,8 @@ ovsdb_call_method(NMOvsdb * self,
case OVSDB_MONITOR:
break;
case OVSDB_ADD_INTERFACE:
+ /* FIXME(applied-connection-immutable): we should not modify the applied
+ * connection, consequently there is no need to clone the connections. */
call->bridge = nm_simple_connection_new_clone(bridge);
call->port = nm_simple_connection_new_clone(port);
call->interface = nm_simple_connection_new_clone(interface);