diff options
| author | Michael Biebl <biebl@debian.org> | 2024-08-09 18:57:15 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2024-08-09 18:57:15 +0200 |
| commit | e96d74409128c6a977e31f24fad9b267d2feb9a1 (patch) | |
| tree | 12dad71135c6c291de457568cb973208ea8a0024 /src/core/devices/team/nm-device-team.c | |
| parent | 45a364c60a9d6d34e614c4f1f507c69336ad1e69 (diff) | |
New upstream version 1.48.8 upstream/1.48.8
Diffstat (limited to 'src/core/devices/team/nm-device-team.c')
| -rw-r--r-- | src/core/devices/team/nm-device-team.c | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/src/core/devices/team/nm-device-team.c b/src/core/devices/team/nm-device-team.c index 1f70537f..0f420a7a 100644 --- a/src/core/devices/team/nm-device-team.c +++ b/src/core/devices/team/nm-device-team.c @@ -238,10 +238,10 @@ update_connection(NMDevice *device, NMConnection *connection) /*****************************************************************************/ static gboolean -master_update_slave_connection(NMDevice *device, - NMDevice *slave, - NMConnection *connection, - GError **error) +controller_update_port_connection(NMDevice *device, + NMDevice *port, + NMConnection *connection, + GError **error) { NMDeviceTeam *self = NM_DEVICE_TEAM(device); NMSettingTeamPort *s_port; @@ -251,23 +251,24 @@ master_update_slave_connection(NMDevice *device, 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); + const char *iface_port = nm_device_get_iface(port); NMConnection *applied_connection = nm_device_get_applied_connection(device); tdc = _tdc_connect_new(self, iface, &connect_error); if (!tdc) { - g_set_error(error, - NM_DEVICE_ERROR, - NM_DEVICE_ERROR_FAILED, - "update slave connection for slave '%s' failed to connect to teamd for master " - "%s (%s)", - iface_slave, - iface, - connect_error->message); + g_set_error( + error, + NM_DEVICE_ERROR, + NM_DEVICE_ERROR_FAILED, + "update port connection for port '%s' failed to connect to teamd for controller " + "%s (%s)", + iface_port, + iface, + connect_error->message); return FALSE; } - err = teamdctl_port_config_get_raw_direct(tdc, iface_slave, (char **) &team_port_config); + err = teamdctl_port_config_get_raw_direct(tdc, iface_port, (char **) &team_port_config); port_config = g_strdup(team_port_config); teamdctl_disconnect(tdc); teamdctl_free(tdc); @@ -275,9 +276,9 @@ master_update_slave_connection(NMDevice *device, g_set_error(error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED, - "update slave connection for slave '%s' failed to get configuration from teamd " - "master %s (err=%d)", - iface_slave, + "update port connection for port '%s' failed to get configuration from teamd " + "controller %s (err=%d)", + iface_port, iface, err); g_free(port_config); @@ -858,7 +859,7 @@ attach_port(NMDevice *device, const char *port_iface = nm_device_get_ip_iface(port); NMSettingTeamPort *s_team_port; - nm_device_master_check_slave_physical_port(device, port, LOGD_TEAM); + nm_device_controller_check_port_physical_port(device, port, LOGD_TEAM); if (configure) { nm_device_take_down(port, TRUE); @@ -881,9 +882,9 @@ attach_port(NMDevice *device, return FALSE; } } - success = nm_platform_link_enslave(nm_device_get_platform(device), - nm_device_get_ip_ifindex(device), - nm_device_get_ip_ifindex(port)); + success = nm_platform_link_attach_port(nm_device_get_platform(device), + nm_device_get_ip_ifindex(device), + nm_device_get_ip_ifindex(port)); nm_device_bring_up(port); if (!success) @@ -927,9 +928,9 @@ detach_port(NMDevice *device, if (ifindex_port <= 0) { _LOGD(LOGD_TEAM, "team port %s is already detached", port_iface); } else if (do_release) { - success = nm_platform_link_release(nm_device_get_platform(device), - nm_device_get_ip_ifindex(device), - ifindex_port); + success = nm_platform_link_release_port(nm_device_get_platform(device), + nm_device_get_ip_ifindex(device), + ifindex_port); if (success) _LOGI(LOGD_TEAM, "detached team port %s", port_iface); else @@ -974,7 +975,7 @@ create_and_realize(NMDevice *device, g_set_error(error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_CREATION_FAILED, - "Failed to create team master interface '%s' for '%s': %s", + "Failed to create team controller interface '%s' for '%s': %s", iface, nm_connection_get_id(connection), nm_strerror(r)); @@ -1127,12 +1128,12 @@ nm_device_team_class_init(NMDeviceTeamClass *klass) device_class->connection_type_check_compatible = NM_SETTING_TEAM_SETTING_NAME; device_class->link_types = NM_DEVICE_DEFINE_LINK_TYPES(NM_LINK_TYPE_TEAM); - device_class->is_controller = TRUE; - device_class->create_and_realize = create_and_realize; - device_class->get_generic_capabilities = get_generic_capabilities; - device_class->complete_connection = complete_connection; - device_class->update_connection = update_connection; - device_class->master_update_slave_connection = master_update_slave_connection; + device_class->is_controller = TRUE; + device_class->create_and_realize = create_and_realize; + device_class->get_generic_capabilities = get_generic_capabilities; + device_class->complete_connection = complete_connection; + device_class->update_connection = update_connection; + device_class->controller_update_port_connection = controller_update_port_connection; device_class->act_stage1_prepare_also_for_external_or_assume = TRUE; device_class->act_stage1_prepare = act_stage1_prepare; |