From b3e550497275598c7a34484a9d0a00c712916066 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Tue, 28 Mar 2023 23:13:08 +0200 Subject: core: don't block a connection that was removed Don't try to block a device/connection pair when the connection was removed. Doing so would create a new devcon entry associated with the connection that is being deleted. Fixes: b73b34c3ee30 ('policy: track autoconnect retries per Device x Connection') --- src/core/nm-policy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/nm-policy.c b/src/core/nm-policy.c index ef7d2e434a..b2ccb16478 100644 --- a/src/core/nm-policy.c +++ b/src/core/nm-policy.c @@ -1326,7 +1326,8 @@ pending_ac_state_changed(NMActiveConnection *ac, guint state, guint reason, NMPo * device, but block the current connection to avoid an activation * loop. */ - if (reason != NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED) { + if (reason != NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED + && reason != NM_ACTIVE_CONNECTION_STATE_REASON_CONNECTION_REMOVED) { con = nm_active_connection_get_settings_connection(ac); nm_manager_devcon_autoconnect_blocked_reason_set( priv->manager, -- cgit v1.2.1