Revert "bond,bridge,team: use uuid for con.master when generating connection"

This reverts commit 836d7511e8.
This commit is contained in:
Fernando Fernandez Mancera 2023-06-30 14:18:10 +00:00
parent 8c0f262549
commit 04ef92fc12
3 changed files with 9 additions and 12 deletions

View file

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

View file

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

View file

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