summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2023-03-28 23:13:08 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2023-03-29 11:19:35 +0200
commitb3e550497275598c7a34484a9d0a00c712916066 (patch)
tree9edc9eadf6e0f3d3e8479fd8d7e682e7a27e170d
parent6d6bd9251002d6fc767e1cb3beab1aeddcef08a9 (diff)
downloadNetworkManager-bg/rh2174353.tar.gz
core: don't block a connection that was removedbg/rh2174353
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')
-rw-r--r--src/core/nm-policy.c3
1 files changed, 2 insertions, 1 deletions
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,