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:13:28 +0200
commit7d4f3298aa8c5bfecf68955fc197cd1c54d349da (patch)
tree4d9108be8ada3a49e2c76ada224fb111ce7cbb4a
parent8e4936f0d80f0c991efdfce75252e9fd1b626c10 (diff)
downloadNetworkManager-nm-1-24.tar.gz
team: perform cleanup immediately when connecting to teamd failsnm-1-24
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)
-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 217c4bdd7c..7ba3034212 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;
}