From d4530effb8ba3790fc1440aac8b099b5f0703572 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 24 Nov 2017 12:54:31 +0100 Subject: [PATCH] policy: don't clear autoconnect-blocked-reason user-request on internal reasons reset_autoconnect_all() as two callers with only_no_secrets=FALSE: - sleeping_changed() when NM returns from sleep. - when device changes to state DISCONNECTED with reason CARRIER. In both cases, this should not overwrite a previous decision by the user that the connection should not autoconnect. (cherry picked from commit d8b4403f6bf46b209071c138ef388737ee5a8770) --- src/nm-policy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nm-policy.c b/src/nm-policy.c index 4b7065da08..b81076c1b8 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -1440,7 +1440,8 @@ reset_autoconnect_all (NMPolicy *self, nm_settings_connection_autoconnect_retries_reset (connection); if (nm_settings_connection_autoconnect_blocked_reason_set (connection, - NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_ALL, + NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_ALL + & ~NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST, FALSE)) changed = TRUE; }