diff --git a/SOURCES/1003-unblock-autoconnect-upon-reapply-rh2217899.patch b/SOURCES/1003-unblock-autoconnect-upon-reapply-rh2217899.patch new file mode 100644 index 0000000..da59085 --- /dev/null +++ b/SOURCES/1003-unblock-autoconnect-upon-reapply-rh2217899.patch @@ -0,0 +1,46 @@ +From 2695396939d2a867145f7db569aaf5cc6b0d742c Mon Sep 17 00:00:00 2001 +From: Gris Ge +Date: Tue, 27 Jun 2023 15:02:54 +0800 +Subject: [PATCH] setting-connection: Unblock autoconnect upon finish of + `Reapply` + +The activation of a connection will clear the block of autoconnect, +we should do the same for reapply. + +Signed-off-by: Gris Ge +(cherry picked from commit 0486efd3584c70179072f611e63b9c0ff6851b80) +(cherry picked from commit 18ce5f43bd16b3cc394424619652c782cb3795c3) +--- + src/core/devices/nm-device.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c +index 5a7c3faba7..dc746131ef 100644 +--- a/src/core/devices/nm-device.c ++++ b/src/core/devices/nm-device.c +@@ -12836,6 +12836,7 @@ check_and_reapply_connection(NMDevice *self, + NMConnection *con_old; + NMConnection *con_new; + GHashTableIter iter; ++ NMSettingsConnection *sett_conn; + + if (priv->state < NM_DEVICE_STATE_PREPARE || priv->state > NM_DEVICE_STATE_ACTIVATED) { + g_set_error_literal(error, +@@ -13008,6 +13009,14 @@ check_and_reapply_connection(NMDevice *self, + if (priv->state >= NM_DEVICE_STATE_ACTIVATED) + nm_device_update_metered(self); + ++ sett_conn = nm_device_get_settings_connection(self); ++ if (sett_conn) { ++ nm_settings_connection_autoconnect_blocked_reason_set( ++ sett_conn, ++ NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST, ++ FALSE); ++ } ++ + return TRUE; + } + +-- +2.39.3 + diff --git a/SPECS/NetworkManager.spec b/SPECS/NetworkManager.spec index 0f1aa55..5083405 100644 --- a/SPECS/NetworkManager.spec +++ b/SPECS/NetworkManager.spec @@ -6,7 +6,7 @@ %global epoch_version 1 %global real_version 1.40.16 %global rpm_version %{real_version} -%global release_version 3 +%global release_version 4 %global snapshot %{nil} %global git_sha %{nil} %global bcond_default_debug 0 @@ -198,6 +198,7 @@ Patch3: 0003-order-ipv6-addresses.patch # Patch1001: 1001-some.patch Patch1001: 1001-ipv6ll-don-t-regenerate-the-address-when-removed-rh2209353.patch Patch1002: 1002-Revert-infiniband-avoid-normalizing-the-p-key-rh2209975.patch +Patch1003: 1003-unblock-autoconnect-upon-reapply-rh2217899.patch Requires(post): systemd %if 0%{?fedora} || 0%{?rhel} >= 8 @@ -1233,9 +1234,12 @@ fi %changelog -* Tue Jul 25 2023 MSVSphere Packaging Team - 1:1.40.16-3 +* Tue Jul 25 2023 MSVSphere Packaging Team - 1:1.40.16-4 - Rebuilt for MSVSphere 8.8 +* Thu Jun 29 2023 Gris Ge - 1:1.40.16-4 +- unblock autoconnect upon reapply (rh #2217899) + * Fri May 26 2023 Wen Liang - 1:1.40.16-3 - revert "infiniband: avoid normalizing the p-key when reading from ifcfg" (rh #2209975)