mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-03 05:30:40 +01:00
team: ensure that teamd is running for assumed devices
When a team device is assumed, we skip stage1 and imply that teamd is
already running. If this doesn't happen (for example because teamd was
manually stopped or because the interface was created in the initrd),
the team interface will continue processing traffic but will not react
to changes in the environment (e.g. carrier changes). Ensure that
teamd is running for assumed devices.
(cherry picked from commit 7ac72f8655)
This commit is contained in:
parent
5fa12f0c14
commit
08a12c683d
1 changed files with 9 additions and 0 deletions
|
|
@ -651,6 +651,14 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason)
|
|||
NMSettingTeam *s_team;
|
||||
const char *cfg;
|
||||
|
||||
if (nm_device_sys_iface_state_is_external (device))
|
||||
return NM_ACT_STAGE_RETURN_SUCCESS;
|
||||
|
||||
if (nm_device_sys_iface_state_is_external_or_assume (device)) {
|
||||
if (ensure_teamd_connection (device))
|
||||
return NM_ACT_STAGE_RETURN_SUCCESS;
|
||||
}
|
||||
|
||||
s_team = nm_device_get_applied_setting (device, NM_TYPE_SETTING_TEAM);
|
||||
if (!s_team)
|
||||
g_return_val_if_reached (NM_ACT_STAGE_RETURN_FAILURE);
|
||||
|
|
@ -977,6 +985,7 @@ nm_device_team_class_init (NMDeviceTeamClass *klass)
|
|||
device_class->update_connection = update_connection;
|
||||
device_class->master_update_slave_connection = master_update_slave_connection;
|
||||
|
||||
device_class->act_stage1_prepare_also_for_external_or_assume = TRUE;
|
||||
device_class->act_stage1_prepare = act_stage1_prepare;
|
||||
device_class->get_configured_mtu = nm_device_get_configured_mtu_for_wired;
|
||||
device_class->deactivate = deactivate;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue