From ec95ce1b7a4b87ba47402d482674cb6176ce2efa Mon Sep 17 00:00:00 2001 From: wangxp006 Date: Thu, 6 May 2021 10:17:47 +0800 Subject: [PATCH] sync patches from upstream community --- NetworkManager.spec | 15 ++++++- ...y-considering-ipv6.may-fail-for-ipv4.patch | 31 ++++++++++++++ ...ect-signals-in-NMDeviceIwd-s-dispose.patch | 40 +++++++++++++++++++ ...-fix-leaking-bearer-in-connect-ready.patch | 38 ++++++++++++++++++ 4 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 backport-device-fix-wrongly-considering-ipv6.may-fail-for-ipv4.patch create mode 100644 backport-iwd-Disconnect-signals-in-NMDeviceIwd-s-dispose.patch create mode 100644 backport-wwan-fix-leaking-bearer-in-connect-ready.patch diff --git a/NetworkManager.spec b/NetworkManager.spec index bccf1c1..9bbe06f 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -47,7 +47,7 @@ Name: NetworkManager Version: 1.26.0 Epoch: 1 -Release: 3 +Release: 4 Summary: Network Link Manager and User Applications License: GPLv2+ URL: https://www.gnome.org/projects/NetworkManager/ @@ -58,6 +58,11 @@ Source2: 00-server.conf Patch1: fix-wants-and-add-requires.patch Patch2: bugfix-NetworkManager-restarting-service-on-dependency-failure.patch +Patch3: backport-device-fix-wrongly-considering-ipv6.may-fail-for-ipv4.patch +Patch4: backport-iwd-Disconnect-signals-in-NMDeviceIwd-s-dispose.patch +Patch5: backport-wwan-fix-leaking-bearer-in-connect-ready.patch + + BuildRequires: gcc libtool pkgconfig automake autoconf intltool gettext-devel ppp-devel gnutls-devel BuildRequires: dbus-devel dbus-glib-devel glib2-devel gobject-introspection-devel jansson-devel BuildRequires: dhclient readline-devel audit-libs-devel gtk-doc libudev-devel libuuid-devel /usr/bin/valac polkit-devel @@ -407,6 +412,14 @@ fi %{_datadir}/gtk-doc/html/NetworkManager/* %changelog +* Thu Apr 29 2021 wangxiaopeng - 1.26.0-4 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: fix leaking bearer in connect ready + disconnect signals in NetworkManager device dispose + fix wrongly considering ipv6.may fail for ipv4 + * Thu Sep 24 2020 zhouyihang - 1.26.0-3 - Type:bugfix - ID:NA diff --git a/backport-device-fix-wrongly-considering-ipv6.may-fail-for-ipv4.patch b/backport-device-fix-wrongly-considering-ipv6.may-fail-for-ipv4.patch new file mode 100644 index 0000000..580b45b --- /dev/null +++ b/backport-device-fix-wrongly-considering-ipv6.may-fail-for-ipv4.patch @@ -0,0 +1,31 @@ +From a0179362231e2c1c4ebba7d5616da2a4677b1c4b Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Wed, 9 Sep 2020 10:59:12 +0200 +Subject: [PATCH] device: fix wrongly considering ipv6.may-fail for ipv4 + +Fixes: 5e71f016057a ('device: merge stage3 and stage4 ip-config function for IPv4 and IPv6') + +reason:fix wrongly considering ipv6.may-fail for ipv4 + +Conflict:NA +Reference:https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/a0179362231e2c1c4ebba7d5616da2a4677b1c4b +--- + src/devices/nm-device.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index c325b40bc3..832116bd05 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -11748,7 +11748,7 @@ activate_stage4_ip_config_timeout_4 (NMDevice *self) + NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE; + NMDeviceStateReason failure_reason = NM_DEVICE_STATE_REASON_NONE; + +- ret = NM_DEVICE_GET_CLASS (self)->act_stage4_ip_config_timeout (self, AF_INET6, &failure_reason); ++ ret = NM_DEVICE_GET_CLASS (self)->act_stage4_ip_config_timeout (self, AF_INET, &failure_reason); + if (ret == NM_ACT_STAGE_RETURN_POSTPONE) + return; + else if (ret == NM_ACT_STAGE_RETURN_FAILURE) { +-- +GitLab + diff --git a/backport-iwd-Disconnect-signals-in-NMDeviceIwd-s-dispose.patch b/backport-iwd-Disconnect-signals-in-NMDeviceIwd-s-dispose.patch new file mode 100644 index 0000000..109554a --- /dev/null +++ b/backport-iwd-Disconnect-signals-in-NMDeviceIwd-s-dispose.patch @@ -0,0 +1,40 @@ +From d2b0c5af6378adbb0fb3c47fea41d2ddd17a6a50 Mon Sep 17 00:00:00 2001 +From: Andrew Zaborowski +Date: Tue, 6 Oct 2020 01:30:26 +0200 +Subject: [PATCH] iwd: Disconnect signals in NMDeviceIwd's dispose + +Fix a crash on device unplugging caused by keeping our signal handlers +for GDBusProxies connected after a call to dispose(). Do this by +replacing most cleanup steps by a nm_device_iwd_set_dbus_object(self, NULL) +call which is more meticulous. + +reason:Disconnect signals in NMDeviceIwd's dispose + +Conflict:NA +Reference:https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/d2b0c5af6378adbb0fb3c47fea41d2ddd17a6a50 +--- + src/devices/wifi/nm-device-iwd.c | 12 +----------- + 1 file changed, 1 insertion(+), 11 deletions(-) + +diff -Naur a/src/devices/wifi/nm-device-iwd.c b/src/devices/wifi/nm-device-iwd.c +--- a/src/devices/wifi/nm-device-iwd.c 2021-02-22 11:15:41.034000000 +0800 ++++ b/src/devices/wifi/nm-device-iwd.c 2021-02-22 16:31:18.817000000 +0800 +@@ -2573,17 +2573,7 @@ + + nm_clear_g_cancellable (&priv->cancellable); + +- nm_clear_g_source (&priv->periodic_scan_id); +- +- cleanup_association_attempt (self, TRUE); +- +- g_clear_object (&priv->dbus_device_proxy); +- g_clear_object (&priv->dbus_station_proxy); +- g_clear_object (&priv->dbus_ap_proxy); +- g_clear_object (&priv->dbus_adhoc_proxy); +- g_clear_object (&priv->dbus_obj); +- +- remove_all_aps (self); ++ nm_device_iwd_set_dbus_object(self, NULL); + + G_OBJECT_CLASS (nm_device_iwd_parent_class)->dispose (object); + diff --git a/backport-wwan-fix-leaking-bearer-in-connect-ready.patch b/backport-wwan-fix-leaking-bearer-in-connect-ready.patch new file mode 100644 index 0000000..3ad7371 --- /dev/null +++ b/backport-wwan-fix-leaking-bearer-in-connect-ready.patch @@ -0,0 +1,38 @@ +From 5747bdb8b851a5c27868d4175b865a915d12549a Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Tue, 23 Feb 2021 07:15:40 +0100 +Subject: [PATCH] wwan: fix leaking "bearer" in connect_ready() + +Fixes: 105ee6e5a9aa ('device: fix crash by handling connection cancellation') + +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/669 + +reason:fix leaking "bearer" in connect_ready() + +Conflict:NA +Reference:https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/5747bdb8b851a5c27868d4175b865a915d12549a +--- + src/devices/wwan/nm-modem-broadband.c | 4 +++++----- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff -Naur a/src/devices/wwan/nm-modem-broadband.c b/src/devices/wwan/nm-modem-broadband.c +--- a/src/devices/wwan/nm-modem-broadband.c 2021-02-23 15:43:39.748000000 +0800 ++++ b/src/devices/wwan/nm-modem-broadband.c 2021-02-23 15:46:28.946000000 +0800 +@@ -359,7 +359,7 @@ + GError *error = NULL; + NMModemIPMethod ip4_method = NM_MODEM_IP_METHOD_UNKNOWN; + NMModemIPMethod ip6_method = NM_MODEM_IP_METHOD_UNKNOWN; +- MMBearer *bearer; ++ gs_unref_object MMBearer *bearer = NULL; + + bearer = mm_modem_simple_connect_finish (simple_iface, res, &error); + +@@ -373,7 +373,7 @@ + if (!ctx) + return; + +- self->_priv.bearer = bearer; ++ self->_priv.bearer = g_steal_pointer(&bearer); + + if (!self->_priv.bearer) { + if (g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_SIM_PIN) || -- Gitee