diff --git a/src/core/devices/nm-device-bond.c b/src/core/devices/nm-device-bond.c index 9ecb2ac7ae..e7ba7c3880 100644 --- a/src/core/devices/nm-device-bond.c +++ b/src/core/devices/nm-device-bond.c @@ -225,7 +225,6 @@ controller_update_port_connection(NMDevice *self, { NMSettingBondPort *s_port; int ifindex_port = nm_device_get_ifindex(port); - NMConnection *applied_connection = nm_device_get_applied_connection(self); const NMPlatformLink *pllink; g_return_val_if_fail(ifindex_port > 0, FALSE); @@ -243,7 +242,7 @@ controller_update_port_connection(NMDevice *self, g_object_set(nm_connection_get_setting_connection(connection), NM_SETTING_CONNECTION_MASTER, - nm_connection_get_uuid(applied_connection), + nm_device_get_iface(self), NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_BOND_SETTING_NAME, NULL); diff --git a/src/core/devices/nm-device-bridge.c b/src/core/devices/nm-device-bridge.c index d8f1337058..31cf361e8e 100644 --- a/src/core/devices/nm-device-bridge.c +++ b/src/core/devices/nm-device-bridge.c @@ -679,10 +679,9 @@ master_update_slave_connection(NMDevice *device, NMDeviceBridge *self = NM_DEVICE_BRIDGE(device); NMSettingConnection *s_con; NMSettingBridgePort *s_port; - int ifindex_slave = nm_device_get_ifindex(slave); - NMConnection *applied_connection = nm_device_get_applied_connection(device); - - const Option *option; + int ifindex_slave = nm_device_get_ifindex(slave); + const char *iface = nm_device_get_iface(device); + const Option *option; g_return_val_if_fail(ifindex_slave > 0, FALSE); @@ -718,7 +717,7 @@ master_update_slave_connection(NMDevice *device, g_object_set(s_con, NM_SETTING_CONNECTION_MASTER, - nm_connection_get_uuid(applied_connection), + iface, NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_BRIDGE_SETTING_NAME, NULL); diff --git a/src/core/devices/team/nm-device-team.c b/src/core/devices/team/nm-device-team.c index 1d2beb5e8a..c113902e4a 100644 --- a/src/core/devices/team/nm-device-team.c +++ b/src/core/devices/team/nm-device-team.c @@ -251,10 +251,9 @@ master_update_slave_connection(NMDevice *device, gs_free_error GError *connect_error = NULL; int err = 0; struct teamdctl *tdc; - const char *team_port_config = NULL; - const char *iface = nm_device_get_iface(device); - const char *iface_slave = nm_device_get_iface(slave); - NMConnection *applied_connection = nm_device_get_applied_connection(device); + const char *team_port_config = NULL; + const char *iface = nm_device_get_iface(device); + const char *iface_slave = nm_device_get_iface(slave); tdc = _tdc_connect_new(self, iface, &connect_error); if (!tdc) { @@ -293,7 +292,7 @@ master_update_slave_connection(NMDevice *device, g_object_set(nm_connection_get_setting_connection(connection), NM_SETTING_CONNECTION_MASTER, - nm_connection_get_uuid(applied_connection), + iface, NM_SETTING_CONNECTION_SLAVE_TYPE, NM_SETTING_TEAM_SETTING_NAME, NULL);