From 197b4e7b158f158ff8e53e95a423679dec94d85a Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Tue, 19 May 2020 09:27:08 +0200 Subject: [PATCH] core: signal parent-active only when the parent AC is activated The parent-active signal is used by the manager to determine when the parent active-connection is ready and a connection that depend on it can proceed. The AC state could transition from ACTIVATING directly to DEACTIVATING; in such case we should not emit the signal but instead just stop watching the parent AC. Fixes: 6e382ea91d5f ('active-connection: add parent active connection tracking') https://bugzilla.redhat.com/show_bug.cgi?id=1778073 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/510 (cherry picked from commit 02ea74c92094a69cd09b16cf7a9a3e494791dd1d) (cherry picked from commit 30be025e5979f3dc97d749209d19fb175bb24ae7) (cherry picked from commit 678c6b6a6aef878bafa1a8b052f0e2de48b9a28a) --- src/nm-active-connection.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index dfd651b9ce..47d2eb6622 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -1006,7 +1006,9 @@ parent_state_cb (NMActiveConnection *parent_ac, return; unwatch_parent (self, TRUE); - g_signal_emit (self, signals[PARENT_ACTIVE], 0, parent_ac); + + if (parent_state == NM_ACTIVE_CONNECTION_STATE_ACTIVATED) + g_signal_emit (self, signals[PARENT_ACTIVE], 0, parent_ac); } static void