!127 backport patches to fix crash, sriov problems and nmcli warning
From: @robertxw Reviewed-by: @wangxp006 Signed-off-by: @wangxp006
This commit is contained in:
commit
8d8623fb00
@ -50,7 +50,7 @@
|
|||||||
Name: NetworkManager
|
Name: NetworkManager
|
||||||
Version: 1.32.12
|
Version: 1.32.12
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Release: 7
|
Release: 8
|
||||||
Summary: Network Link Manager and User Applications
|
Summary: Network Link Manager and User Applications
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://www.gnome.org/projects/NetworkManager/
|
URL: https://www.gnome.org/projects/NetworkManager/
|
||||||
@ -62,6 +62,11 @@ Patch2: bugfix-use-PartOf-replace-Requires-in-service.patch
|
|||||||
Patch3: bugfix-ipv6-external-route-miss.patch
|
Patch3: bugfix-ipv6-external-route-miss.patch
|
||||||
Patch4: bugfix-recover-to-30s-timeout-in-NetworkManager-wait-online.patch
|
Patch4: 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
|
||||||
|
|
||||||
BuildRequires: gcc libtool pkgconfig automake autoconf intltool gettext-devel ppp-devel gnutls-devel
|
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: 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
|
BuildRequires: dhclient readline-devel audit-libs-devel gtk-doc libudev-devel libuuid-devel /usr/bin/valac polkit-devel
|
||||||
@ -474,6 +479,15 @@ fi
|
|||||||
%{_datadir}/gtk-doc/html/NetworkManager/*
|
%{_datadir}/gtk-doc/html/NetworkManager/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 1 2022 gaoxingwang <gaoxingwang1@huawei.com> - 1:1.32.12-8
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:libnm:fix warning when setting wrong ethtool ternary value
|
||||||
|
core: reload config for active devices
|
||||||
|
libnm: fix crash on failure of nm_vpn_plugin_info_new_from_file()
|
||||||
|
libnm: fix crash in _nm_ip_route_validate_all for invalid-route
|
||||||
|
|
||||||
* Sat Jul 30 2022 gaoxingwang <gaoxingwang1@huawei.com> - 1:1.32.12-7
|
* Sat Jul 30 2022 gaoxingwang <gaoxingwang1@huawei.com> - 1:1.32.12-7
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
39
backport-core-reload-config-for-active-devices.patch
Normal file
39
backport-core-reload-config-for-active-devices.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From e2b75a388672eee514e4efa02b506b0a9ffaa9f0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fernando Fernandez Mancera <ffmancera@riseup.net>
|
||||||
|
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 <ffmancera@riseup.net>
|
||||||
|
(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
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
From 00723dd5e85ce5eb27e189acad3fe76b09ff2890 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vojtech Bubela <vbubela@redhat.com>
|
||||||
|
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=<optimized out>, 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=<optimized out>, 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=<optimized out>, method_info=<optimized out>, connection=<optimized out>, sender=<optimized out>, 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
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
From 9d7c09261475b29e30f62d7ea644ec5a782e6cec Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thomas Haller <thaller@redhat.com>
|
||||||
|
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=<optimized out>, args=<optimized out>) at ../glib/gmessages.c:1413
|
||||||
|
#1 0x00007f71446b3903 in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) 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=<optimized out>) 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=<optimized out>, 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=<optimized out>, 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=<optimized out>, user_data=<optimized out>)
|
||||||
|
at src/core/vpn/nm-vpn-manager.c:182
|
||||||
|
#9 0x00007f71448697a3 in _g_cclosure_marshal_VOID__OBJECT_OBJECT_ENUMv
|
||||||
|
(closure=0x56455c7e4250, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, 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
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
From 45f8c78c61e5b42f5b39c354f83109bae3cdcf43 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Beniamino Galvani <bgalvani@redhat.com>
|
||||||
|
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
|
||||||
Loading…
x
Reference in New Issue
Block a user