Blob Blame History Raw
From bb35124e97fbe524b65bcaac2af649d9d37f3a2a Mon Sep 17 00:00:00 2001
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Mon, 11 Jan 2021 16:40:21 +0100
Subject: [PATCH] device: clean up dispatcher calls when canceling an
 activation

Ensure the callback for dispatcher calls is not executed, or it will
resume the activation chain we want to interrupt.

https://bugzilla.redhat.com/show_bug.cgi?id=1888348
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/723
(cherry picked from commit 8180b0180beba0c492bf172a32069c77e501f884)
(cherry picked from commit 88eb0beb5277da7973bf0f22bfd547abb4396988)
(cherry picked from commit cdbd6bd9e139d11aacd2447994599763ab3624cd)
---
 src/devices/nm-device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 012af4d9a5..0fd3fe2adb 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -15527,6 +15527,7 @@ _cancel_activation (NMDevice *self)
 		priv->fw_state = FIREWALL_STATE_INITIALIZED;
 	}
 
+	dispatcher_cleanup (self);
 	ip_check_gw_ping_cleanup (self);
 
 	/* Break the activation chain */
-- 
2.26.2