summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2020-07-14 22:52:56 +0200
committerThomas Haller <thaller@redhat.com>2021-08-11 14:38:23 +0200
commita71a5ee8959de3809362f1a99bccd29f6eac0702 (patch)
tree032b914a85735a2e36f421188cc85cc01bdfdcee
parentfa8ac38c6a20c5956181d99d3c14f3c8cb2ef858 (diff)
downloadNetworkManager-nm-1-22.tar.gz
team: perform cleanup immediately when connecting to teamd failsnm-1-22
When NM fails to connect to teamd during an activation, it sets the device state to FAILED. Eventually the device will become DISCONNECTED and will call the ->deactivate() method that will perform the cleanup of timers, teamd process and teamdctl instance. However, in this way, when the device is DISCONNECTED timers are still armed and can be triggered in the wrong state. Instead, perform the cleanup immediately on failure. https://bugzilla.redhat.com/show_bug.cgi?id=1856723 (cherry picked from commit 26e97fcd0d4a70e32a484d3bfc57c1802da10554) (cherry picked from commit 680c0b88122077101cbfd878a70d54fb7a4afcea) (cherry picked from commit 7d4f3298aa8c5bfecf68955fc197cd1c54d349da)
-rw-r--r--src/devices/team/nm-device-team.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c
index 19444e277b..db65938e62 100644
--- a/src/devices/team/nm-device-team.c
+++ b/src/devices/team/nm-device-team.c
@@ -371,6 +371,7 @@ teamd_ready (NMDeviceTeam *self)
success = teamd_read_config (self);
if (!success) {
+ teamd_cleanup (self, TRUE);
nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED);
return;
}