diff --git a/NetworkManager-1.32.12.tar.xz b/NetworkManager-1.40.6.tar.xz similarity index 40% rename from NetworkManager-1.32.12.tar.xz rename to NetworkManager-1.40.6.tar.xz index 67c87326759230b1c86f363e87831844efe650a9..983e8db5254953b09052be36080a429e2fec68b9 100644 Binary files a/NetworkManager-1.32.12.tar.xz and b/NetworkManager-1.40.6.tar.xz differ diff --git a/NetworkManager.spec b/NetworkManager.spec index 3a6ff93fee175bc7850d4dd25c122045d115936d..4223daaa517aa06c5106f2efd0138e9b8a739289 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -48,9 +48,9 @@ %global dhcp_default dhclient Name: NetworkManager -Version: 1.32.12 +Version: 1.40.6 Epoch: 1 -Release: 16 +Release: 1 Summary: Network Link Manager and User Applications License: GPLv2+ URL: https://networkmanager.dev/ @@ -59,15 +59,9 @@ Source1: NetworkManager.conf Source2: 00-server.conf Patch1: fix-wants-and-add-requires.patch Patch2: bugfix-use-PartOf-replace-Requires-in-service.patch -Patch3: bugfix-ipv6-external-route-miss.patch -Patch4: bugfix-recover-to-30s-timeout-in-NetworkManager-wait-online.patch +Patch3: bugfix-recover-to-30s-timeout-in-NetworkManager-wait-online.patch -Patch6000: backport-libnm-fix-crash-in-_nm_ip_route_validate_all-for-invalid-route.patch -Patch6001: backport-libnm-fix-crash-on-failure-of-nm_vpn_plugin_info_new_from_file.patch -Patch6002: backport-core-reload-config-for-active-devices.patch -Patch6003: backport-libnm-fix-warning-when-setting-wrong-ethtool-ternary-value.patch -Patch6004: fix-minor-written-mistake.patch -Patch6005: NetworkManager-Add-sw64-architecture.patch +Patch6000: NetworkManager-Add-sw64-architecture.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 @@ -488,6 +482,12 @@ fi %{_datadir}/gtk-doc/html/NetworkManager/* %changelog +* Wed Dec 7 2022 gaoxingwang - 1:1.40.6-1 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:update version to 1.40.6 + * Wed Dec 7 2022 chendexi - 1:1.32.12-16 - Type:bugfix - CVE:NA diff --git a/backport-core-reload-config-for-active-devices.patch b/backport-core-reload-config-for-active-devices.patch deleted file mode 100644 index 69a8a71041b187b72dfc7cc4d4304785c1e63a2e..0000000000000000000000000000000000000000 --- a/backport-core-reload-config-for-active-devices.patch +++ /dev/null @@ -1,39 +0,0 @@ -From e2b75a388672eee514e4efa02b506b0a9ffaa9f0 Mon Sep 17 00:00:00 2001 -From: Fernando Fernandez Mancera -Date: Sun, 17 Oct 2021 12:12:58 +0200 -Subject: [PATCH] core: reload config for active devices - -When NetworkManager is reloaded the config from active devices is not -being reloaded properly. - -Related: https://bugzilla.redhat.com/1852445 - -Fixes: 121c58f0c48d ('core: set number of SR-IOV VFs asynchronously') - -Conflict:NA -Reference:https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/e2b75a388672eee514e4efa02b506b0a9ffaa9f0 -Signed-off-by: Fernando Fernandez Mancera -(cherry picked from commit ff9b64c923abf072aa789862be94bcb0de08e2f4) ---- - src/core/devices/nm-device.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c -index 50386d0018..7bfdf80137 100644 ---- a/src/core/devices/nm-device.c -+++ b/src/core/devices/nm-device.c -@@ -5976,9 +5976,10 @@ config_changed(NMConfig * config, - { - NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self); - -- if (priv->state <= NM_DEVICE_STATE_DISCONNECTED || priv->state > NM_DEVICE_STATE_ACTIVATED) { -+ if (priv->state <= NM_DEVICE_STATE_DISCONNECTED || priv->state >= NM_DEVICE_STATE_ACTIVATED) { - priv->ignore_carrier = nm_config_data_get_ignore_carrier(config_data, self); -- if (NM_FLAGS_HAS(changes, NM_CONFIG_CHANGE_VALUES)) -+ if (NM_FLAGS_HAS(changes, NM_CONFIG_CHANGE_VALUES) -+ && !nm_device_get_applied_setting(self, NM_TYPE_SETTING_SRIOV)) - device_init_static_sriov_num_vfs(self); - } - } --- -2.23.0 diff --git a/backport-libnm-fix-crash-in-_nm_ip_route_validate_all-for-invalid-route.patch b/backport-libnm-fix-crash-in-_nm_ip_route_validate_all-for-invalid-route.patch deleted file mode 100644 index ceb0d866d64d6678f298e4e03789dfbd6a000306..0000000000000000000000000000000000000000 --- a/backport-libnm-fix-crash-in-_nm_ip_route_validate_all-for-invalid-route.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 00723dd5e85ce5eb27e189acad3fe76b09ff2890 Mon Sep 17 00:00:00 2001 -From: Vojtech Bubela -Date: Wed, 29 Sep 2021 12:38:40 +0200 -Subject: [PATCH] libnm: fix crash in _nm_ip_route_validate_all for invalid - route - -backtrace from coredump, NetworkManager-1.30.6-1.fc34 - - #0 verify - (setting=0x55d081fe8690, connection=, error=0x7ffe0fa06870) - at libnm-core/nm-setting-ip-config.c:5249 - #1 0x000055d081ab98d4 in verify - (setting=0x55d081fe8690, connection=0x55d0820a2b80, error=0x7ffe0fa06870) - at libnm-core/nm-setting-ip4-config.c:119 - #2 0x000055d081aa3d54 in _nm_connection_verify - (connection=0x55d0820a2b80, error=0x7ffe0fa068c0) - at libnm-core/nm-connection.c:1441 - #3 0x000055d081aa78ec in nm_connection_normalize - (connection=0x55d0820a2b80, parameters=0x0, modified=0x0, error=0x7ffe0fa06de8) - at libnm-core/nm-connection.c:1688 - #4 0x000055d081aa81f4 in _nm_connection_replace_settings - (connection=0x55d0820a2b80, new_settings=, parse_flags=_NM_SETTING_PARSE_FLAGS_LAST, error=0x7ffe0fa06de8) at libnm-core/nm-connection.c:432 - #5 0x000055d081aa83a6 in _nm_simple_connection_new_from_dbus - (dict=0x55d082089950, error=0x7ffe0fa06de8, parse_flags=_NM_SETTING_PARSE_FLAGS_LAST) at libnm-core/nm-simple-connection.c:77 - #6 0x000055d081bbf942 in settings_connection_update - (self=0x55d081fdd9f0, is_update2=1, context=0x7fc06c021dd0, new_settings=0x55d082089950, flags=NM_SETTINGS_UPDATE2_FLAG_TO_DISK) - at src/core/settings/nm-settings-connection.c:1637 - #7 0x000055d081bbfb09 in impl_settings_connection_update2 - (obj=0x55d081fdd9f0, interface_info=, method_info=, connection=, sender=, invocation=0x7fc06c021dd0, parameters=0x55d0820f5e60) at src/core/settings/nm-settings-connection.c:1796 - #8 0x00007fc08a9db482 in call_in_idle_cb.lto_priv () at /lib64/libgio-2.0.so.0 - -Conflict:NA -Reference:https://gitlab.freedesktop.org/NetworkManager/NetworkManager/commit/00723dd5e85ce5eb27e189acad3fe76b09ff2890 - -Fixes: bb6c2d73713f ('libnm: ensure stable behavior in _nm_ip_route_attribute_validate_all()') -(cherry picked from commit 0ed099374d92d1c4f7472df5fe503f3cd3e67905) ---- - src/libnm-core-impl/nm-setting-ip-config.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libnm-core-impl/nm-setting-ip-config.c b/src/libnm-core-impl/nm-setting-ip-config.c -index f37e9d351e..311babefa1 100644 ---- a/src/libnm-core-impl/nm-setting-ip-config.c -+++ b/src/libnm-core-impl/nm-setting-ip-config.c -@@ -1440,7 +1440,7 @@ _nm_ip_route_attribute_validate_all(const NMIPRoute *route, GError **error) - const char *key = attrs[i].name; - GVariant * val2 = attrs[i].value_ptr; - -- if (!nm_ip_route_attribute_validate(key, val2, route->family, NULL, NULL)) -+ if (!nm_ip_route_attribute_validate(key, val2, route->family, NULL, error)) - return FALSE; - } - --- -2.23.0 diff --git a/backport-libnm-fix-crash-on-failure-of-nm_vpn_plugin_info_new_from_file.patch b/backport-libnm-fix-crash-on-failure-of-nm_vpn_plugin_info_new_from_file.patch deleted file mode 100644 index ecbe26843217e1f857c1c9e4e12fc8a98ed93265..0000000000000000000000000000000000000000 --- a/backport-libnm-fix-crash-on-failure-of-nm_vpn_plugin_info_new_from_file.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 9d7c09261475b29e30f62d7ea644ec5a782e6cec Mon Sep 17 00:00:00 2001 -From: Thomas Haller -Date: Mon, 11 Oct 2021 22:16:00 +0200 -Subject: [PATCH] libnm: fix crash on failure of - nm_vpn_plugin_info_new_from_file() - -nm_vpn_plugin_info_new_from_file() may fail as NMVpnPlugin is an -GInitable. As such, the destructor must handle the case where the -instance was only partly initialized. - - #0 g_logv (log_domain=0x7f7144703071 "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=, args=) at ../glib/gmessages.c:1413 - #1 0x00007f71446b3903 in g_log (log_domain=, log_level=, format=) at ../glib/gmessages.c:1451 - #2 0x000056455b8e58d0 in finalize (object=0x7f7128008180 [NMVpnPluginInfo]) at src/libnm-core-impl/nm-vpn-plugin-info.c:1280 - #3 0x00007f71447b8b18 in g_object_unref (_object=) at ../gobject/gobject.c:3524 - #4 g_object_unref (_object=0x7f7128008180) at ../gobject/gobject.c:3416 - #5 0x00007f714486bc09 in g_initable_new_valist - (object_type=, first_property_name=0x56455b925c20 "filename", var_args=var_args@entry=0x7ffe702b1140, cancellable=cancellable@entry=0x0, error=error@entry=0x7ffe702b1248) at ../gio/ginitable.c:250 - #6 0x00007f714486bcad in g_initable_new - (object_type=, cancellable=cancellable@entry=0x0, error=error@entry=0x7ffe702b1248, first_property_name=first_property_name@entry=0x56455b925c20 "filename") - at ../gio/ginitable.c:162 - #7 0x000056455b8e69f6 in nm_vpn_plugin_info_new_from_file - (filename=filename@entry=0x56455c951ec0 "/opt/test/lib/NetworkManager/VPN/nm-openvpn-service.name", error=error@entry=0x7ffe702b1248) at src/libnm-core-impl/nm-vpn-plugin-info.c:1221 - #8 0x000056455b88ce9a in vpn_dir_changed - (monitor=monitor@entry=0x7f7128007860 [GInotifyFileMonitor], file=file@entry=0x7f712c005600, other_file=other_file@entry=0x0, event_type=, user_data=) - at src/core/vpn/nm-vpn-manager.c:182 - #9 0x00007f71448697a3 in _g_cclosure_marshal_VOID__OBJECT_OBJECT_ENUMv - (closure=0x56455c7e4250, return_value=, instance=, args=, marshal_data=, n_params=, param_types=0x56455c7355a0) at ../gio/gmarshal-internal.c:1380 - -Conflict:NA -Reference:https://gitlab.freedesktop.org/NetworkManager/NetworkManager/commit/9d7c09261475b29e30f62d7ea644ec5a782e6cec - -Fixes: d6226bd98713 ('libnm: add NMVpnPluginInfo class') -(cherry picked from commit 841c45a4f5c0ee34674fe24ef8f9198ca506a64e) ---- - src/libnm-core-impl/nm-vpn-plugin-info.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libnm-core-impl/nm-vpn-plugin-info.c b/src/libnm-core-impl/nm-vpn-plugin-info.c -index dc77dfd025..665863d108 100644 ---- a/src/libnm-core-impl/nm-vpn-plugin-info.c -+++ b/src/libnm-core-impl/nm-vpn-plugin-info.c -@@ -1277,7 +1277,7 @@ finalize(GObject *object) - g_free(priv->auth_dialog); - g_strfreev(priv->aliases); - g_free(priv->filename); -- g_hash_table_unref(priv->keys); -+ nm_g_hash_table_unref(priv->keys); - - nm_clear_pointer(&priv->keyfile, g_key_file_unref); - --- -2.23.0 diff --git a/backport-libnm-fix-warning-when-setting-wrong-ethtool-ternary-value.patch b/backport-libnm-fix-warning-when-setting-wrong-ethtool-ternary-value.patch deleted file mode 100644 index 9e7e79726e8f08c199940b77898d2424e8a9e7fd..0000000000000000000000000000000000000000 --- a/backport-libnm-fix-warning-when-setting-wrong-ethtool-ternary-value.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 45f8c78c61e5b42f5b39c354f83109bae3cdcf43 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Mon, 20 Dec 2021 07:46:59 +0100 -Subject: [PATCH] libnm: fix warning when setting wrong ethtool ternary value - - $ nmcli connection modify dummy1 ethtool.feature-rx a - (process:3077356): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory. - This indicates a bug in someone's code. You must ensure an error is NULL before it's set. - The overwriting error message was: 'a' is not valid; use 'on', 'off', or 'ignore' - Error: failed to modify ethtool.feature-rx: 'a' is not valid; use [true, yes, on], [false, no, off] or [unknown]. - -Conflict:NA -Reference:https://gitlab.freedesktop.org/NetworkManager/NetworkManager/commit/45f8c78c61e5b42f5b39c354f83109bae3cdcf43 - -Fixes: e5b46aa38ab1 ('cli: use nmc_string_to_ternary() to parse ternary in _set_fcn_ethtool()') -(cherry picked from commit 25e705c361c5edbf152c5a2570c0038faa4195cf) -(cherry picked from commit 2aa19708c217f4ae46f939d80c565ca156af7ee3) ---- - src/libnmc-setting/nm-meta-setting-desc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libnmc-setting/nm-meta-setting-desc.c b/src/libnmc-setting/nm-meta-setting-desc.c -index 1cc5f9c15f..1ee9e3077c 100644 ---- a/src/libnmc-setting/nm-meta-setting-desc.c -+++ b/src/libnmc-setting/nm-meta-setting-desc.c -@@ -4318,7 +4318,7 @@ static gboolean _set_fcn_ethtool(ARGS_SET_FCN) - if (!nmc_string_to_ternary_full(value, - NMC_STRING_TO_TERNARY_FLAGS_IGNORE_FOR_DEFAULT, - &t, -- error)) { -+ NULL)) { - g_set_error(error, - NM_UTILS_ERROR, - NM_UTILS_ERROR_INVALID_ARGUMENT, --- -2.23.0 diff --git a/bugfix-ipv6-external-route-miss.patch b/bugfix-ipv6-external-route-miss.patch deleted file mode 100644 index b921604e861f347259a20b158305a0e07526e846..0000000000000000000000000000000000000000 --- a/bugfix-ipv6-external-route-miss.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 386467d16455cc027d1ff9a6ef65d01c172a9f8f Mon Sep 17 00:00:00 2001 -From: gaoxingwang -Date: Mon, 7 Mar 2022 11:04:17 +0800 -Subject: [PATCH] revert external flag - ---- - src/libnm-platform/nm-platform.c | 44 ++++++++------------------------ - 1 file changed, 10 insertions(+), 34 deletions(-) - -diff --git a/src/libnm-platform/nm-platform.c b/src/libnm-platform/nm-platform.c -index b7a65df..9b9c194 100644 ---- a/src/libnm-platform/nm-platform.c -+++ b/src/libnm-platform/nm-platform.c -@@ -4528,20 +4528,6 @@ nm_platform_ip_route_sync(NMPlatform *self, - - conf_o = routes->pdata[i]; - -- if (NMP_OBJECT_CAST_IP_ROUTE(conf_o)->is_external) { -- /* This route is added externally. We don't have our own agenda to -- * add it, so skip. */ -- continue; -- } -- -- /* User space cannot add IPv6 routes with metric 0. However, kernel can, and we might track such -- * routes in @route as they are present external. As we already skipped external routes above, -- * we don't expect a user's choice to add such a route (it won't work anyway). */ -- nm_assert( -- IS_IPv4 -- || nm_platform_ip6_route_get_effective_metric(NMP_OBJECT_CAST_IP6_ROUTE(conf_o)) -- != 0); -- - #define VTABLE_IS_DEVICE_ROUTE(vt, o) \ - (vt->is_ip4 ? (NMP_OBJECT_CAST_IP4_ROUTE(o)->gateway == 0) \ - : IN6_IS_ADDR_UNSPECIFIED(&NMP_OBJECT_CAST_IP6_ROUTE(o)->gateway)) -@@ -4558,7 +4544,7 @@ nm_platform_ip_route_sync(NMPlatform *self, - routes_idx = g_hash_table_new((GHashFunc) nmp_object_id_hash, - (GEqualFunc) nmp_object_id_equal); - } -- if (!g_hash_table_add(routes_idx, (gpointer) conf_o)) { -+ if (!g_hash_table_insert(routes_idx, (gpointer) conf_o, (gpointer) conf_o)) { - _LOG3D("route-sync: skip adding duplicate route %s", - nmp_object_to_string(conf_o, - NMP_OBJECT_TO_STRING_PUBLIC, -@@ -4567,6 +4553,14 @@ nm_platform_ip_route_sync(NMPlatform *self, - continue; - } - -+ if (!IS_IPv4 -+ && nm_platform_ip6_route_get_effective_metric(NMP_OBJECT_CAST_IP6_ROUTE(conf_o)) -+ == 0) { -+ /* User space cannot add routes with metric 0. However, kernel can, and we might track such -+ * routes in @route as they are present external. Skip them silently. */ -+ continue; -+ } -+ - plat_entry = nm_platform_lookup_entry(self, NMP_CACHE_ID_TYPE_OBJECT_TYPE, conf_o); - if (plat_entry) { - const NMPObject *plat_o; -@@ -4729,24 +4723,6 @@ sync_route_add: - } - - if (routes_prune) { -- if (routes) { -- for (i = 0; i < routes->len; i++) { -- conf_o = routes->pdata[i]; -- -- if (NMP_OBJECT_CAST_IP_ROUTE(conf_o)->is_external) { -- /* this is only to catch the case where an external route is -- * both in @routes and @routes_prune list. In that case, -- * @routes should win and we should not remove the address. */ -- if (!routes_idx) { -- routes_idx = g_hash_table_new((GHashFunc) nmp_object_id_hash, -- (GEqualFunc) nmp_object_id_equal); -- } -- g_hash_table_add(routes_idx, (gpointer) conf_o); -- continue; -- } -- } -- } -- - for (i = 0; i < routes_prune->len; i++) { - const NMPObject *prune_o; - -@@ -4757,7 +4733,7 @@ sync_route_add: - || (!NM_IS_IPv4(addr_family) - && NMP_OBJECT_GET_TYPE(prune_o) == NMP_OBJECT_TYPE_IP6_ROUTE)); - -- if (nm_g_hash_table_lookup(routes_idx, prune_o)) -+ if (routes_idx && g_hash_table_lookup(routes_idx, prune_o)) - continue; - - if (!nm_platform_lookup_entry(self, NMP_CACHE_ID_TYPE_OBJECT_TYPE, prune_o)) --- -2.33.0 \ No newline at end of file