From a71a5ee8959de3809362f1a99bccd29f6eac0702 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Tue, 14 Jul 2020 22:52:56 +0200 Subject: team: perform cleanup immediately when connecting to teamd fails 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) --- src/devices/team/nm-device-team.c | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.2.1