Compare commits
No commits in common. 'c9' and 'c9-beta' have entirely different histories.
@ -1 +1 @@
|
|||||||
6423adef5f4bb2c0cc20c2173e03a7ac8b8565ca SOURCES/NetworkManager-1.48.10.tar.xz
|
3c11d700a2e81a7abce285ab94d015ac966f59d3 SOURCES/NetworkManager-1.46.0.tar.xz
|
||||||
|
@ -1 +1 @@
|
|||||||
SOURCES/NetworkManager-1.48.10.tar.xz
|
SOURCES/NetworkManager-1.46.0.tar.xz
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
From 065584036f8072c994a8bdab210bcfd0ff483960 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Tue, 27 Aug 2024 00:29:17 +0200
|
|
||||||
Subject: [PATCH] cloud-setup: allow bigger restart bursts
|
|
||||||
|
|
||||||
On daemon startup, we may end up enqueueing many nm-cloud-setup.service
|
|
||||||
restarts in very a short time. That is perfectly fine, just bump the
|
|
||||||
thresholds so that systemd doesn't get in the way too quickly.
|
|
||||||
|
|
||||||
100 requests in 1 seconds seem like a fair choice -- little bit on the
|
|
||||||
conservative side, yet still giving the service manager some room to
|
|
||||||
interfere on a chance things really go awry.
|
|
||||||
|
|
||||||
https://issues.redhat.com/browse/RHEL-49694
|
|
||||||
(cherry picked from commit 927cff9f178911b2a146259a89bfcc9727cbd8c3)
|
|
||||||
(cherry picked from commit 4dc35c72744f8820575ab0ea4638c4ddd880547d)
|
|
||||||
---
|
|
||||||
src/nm-cloud-setup/nm-cloud-setup.service.in | 11 +++++++++++
|
|
||||||
1 file changed, 11 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/nm-cloud-setup/nm-cloud-setup.service.in b/src/nm-cloud-setup/nm-cloud-setup.service.in
|
|
||||||
index e73654d892..ecb70e1c8e 100644
|
|
||||||
--- a/src/nm-cloud-setup/nm-cloud-setup.service.in
|
|
||||||
+++ b/src/nm-cloud-setup/nm-cloud-setup.service.in
|
|
||||||
@@ -8,6 +8,17 @@ After=NetworkManager.service
|
|
||||||
Type=oneshot
|
|
||||||
ExecStart=@libexecdir@/nm-cloud-setup
|
|
||||||
|
|
||||||
+# The service restart gets triggered from dispatcher script
|
|
||||||
+# (pre-up and dhcp4-change actions), possibly ending up with many
|
|
||||||
+# restart requests at the same time (e.g. on initial daemon startup
|
|
||||||
+# on a machine with multiple NICs). The systemd handles multiple
|
|
||||||
+# concurrent restart requests gracefully (the newer requests supersede
|
|
||||||
+# older, which wait for them to finish), but the default limits are way
|
|
||||||
+# too low: 5 restarts in 10 seconds. Raise that high enough for us to
|
|
||||||
+# be on the safe side.
|
|
||||||
+StartLimitIntervalSec=1
|
|
||||||
+StartLimitBurst=100
|
|
||||||
+
|
|
||||||
#Environment=NM_CLOUD_SETUP_LOG=TRACE
|
|
||||||
|
|
||||||
# Cloud providers are disabled by default. You need to
|
|
||||||
--
|
|
||||||
2.46.0
|
|
||||||
|
|
@ -1,140 +0,0 @@
|
|||||||
From 7183fbf6f35572f9fb0c2eeef5c155a3b9c82a54 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= <ihuguet@redhat.com>
|
|
||||||
Date: Tue, 27 Aug 2024 12:08:16 +0200
|
|
||||||
Subject: [PATCH] cloud-setup: azure: ensure that primary address is placed
|
|
||||||
first
|
|
||||||
|
|
||||||
The primary address is that placed at position 0 of all the IP Addresses
|
|
||||||
of the interface. Sometimes we put it in a different position in the
|
|
||||||
ipv4s array because we insert them in the order we receive, but it might
|
|
||||||
happen that the HTTP responses comes back in wrong order.
|
|
||||||
|
|
||||||
In order to solve this, we pass the index of the IPv4 address to the
|
|
||||||
callback and the address is added in the right position directly.
|
|
||||||
|
|
||||||
Co-authored-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
|
|
||||||
(cherry picked from commit 72014db629cff33611ade58190d45a714efa1bbf)
|
|
||||||
(cherry picked from commit c976e212372da9683a1e2f8618e3bcfdf21d5e25)
|
|
||||||
---
|
|
||||||
src/nm-cloud-setup/nmcs-provider-azure.c | 43 ++++++++++++++++--------
|
|
||||||
1 file changed, 29 insertions(+), 14 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/nm-cloud-setup/nmcs-provider-azure.c b/src/nm-cloud-setup/nmcs-provider-azure.c
|
|
||||||
index 771c43d9ad..78eda16cbb 100644
|
|
||||||
--- a/src/nm-cloud-setup/nmcs-provider-azure.c
|
|
||||||
+++ b/src/nm-cloud-setup/nmcs-provider-azure.c
|
|
||||||
@@ -102,6 +102,11 @@ typedef struct {
|
|
||||||
guint n_iface_data_pending;
|
|
||||||
} AzureIfaceData;
|
|
||||||
|
|
||||||
+typedef struct {
|
|
||||||
+ AzureIfaceData *iface_data;
|
|
||||||
+ guint64 ipaddress_idx;
|
|
||||||
+} AzureIpAddressReqData;
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
_azure_iface_data_destroy(AzureIfaceData *iface_data)
|
|
||||||
{
|
|
||||||
@@ -112,7 +117,8 @@ static void
|
|
||||||
_get_config_fetch_done_cb(NMHttpClient *http_client,
|
|
||||||
GAsyncResult *result,
|
|
||||||
AzureIfaceData *iface_data,
|
|
||||||
- GetConfigFetchType fetch_type)
|
|
||||||
+ GetConfigFetchType fetch_type,
|
|
||||||
+ guint64 ipaddress_idx)
|
|
||||||
{
|
|
||||||
NMCSProviderGetConfigTaskData *get_config_data;
|
|
||||||
NMCSProviderGetConfigIfaceData *iface_get_config;
|
|
||||||
@@ -149,9 +155,7 @@ _get_config_fetch_done_cb(NMHttpClient *http_client,
|
|
||||||
_LOGD("interface[%" G_GSSIZE_FORMAT "]: received address %s",
|
|
||||||
iface_data->intern_iface_idx,
|
|
||||||
nm_inet4_ntop(tmp_addr, tmp_addr_str));
|
|
||||||
- iface_get_config->ipv4s_arr[iface_get_config->ipv4s_len] = tmp_addr;
|
|
||||||
- iface_get_config->has_ipv4s = TRUE;
|
|
||||||
- iface_get_config->ipv4s_len++;
|
|
||||||
+ iface_get_config->ipv4s_arr[ipaddress_idx] = tmp_addr;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GET_CONFIG_FETCH_TYPE_IPV4_SUBNET_0_ADDRESS:
|
|
||||||
@@ -203,10 +207,14 @@ _get_config_fetch_done_cb_ipv4_ipaddress_x_privateipaddress(GObject *source
|
|
||||||
GAsyncResult *result,
|
|
||||||
gpointer user_data)
|
|
||||||
{
|
|
||||||
+ AzureIpAddressReqData *ipaddress_req_data = user_data;
|
|
||||||
+
|
|
||||||
_get_config_fetch_done_cb(NM_HTTP_CLIENT(source),
|
|
||||||
result,
|
|
||||||
- user_data,
|
|
||||||
- GET_CONFIG_FETCH_TYPE_IPV4_IPADDRESS_X_PRIVATEIPADDRESS);
|
|
||||||
+ ipaddress_req_data->iface_data,
|
|
||||||
+ GET_CONFIG_FETCH_TYPE_IPV4_IPADDRESS_X_PRIVATEIPADDRESS,
|
|
||||||
+ ipaddress_req_data->ipaddress_idx);
|
|
||||||
+ g_free(ipaddress_req_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
@@ -217,7 +225,8 @@ _get_config_fetch_done_cb_ipv4_subnet_0_address(GObject *source,
|
|
||||||
_get_config_fetch_done_cb(NM_HTTP_CLIENT(source),
|
|
||||||
result,
|
|
||||||
user_data,
|
|
||||||
- GET_CONFIG_FETCH_TYPE_IPV4_SUBNET_0_ADDRESS);
|
|
||||||
+ GET_CONFIG_FETCH_TYPE_IPV4_SUBNET_0_ADDRESS,
|
|
||||||
+ 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
@@ -228,7 +237,8 @@ _get_config_fetch_done_cb_ipv4_subnet_0_prefix(GObject *source,
|
|
||||||
_get_config_fetch_done_cb(NM_HTTP_CLIENT(source),
|
|
||||||
result,
|
|
||||||
user_data,
|
|
||||||
- GET_CONFIG_FETCH_TYPE_IPV4_SUBNET_0_PREFIX);
|
|
||||||
+ GET_CONFIG_FETCH_TYPE_IPV4_SUBNET_0_PREFIX,
|
|
||||||
+ 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
@@ -265,9 +275,10 @@ _get_config_ips_prefix_list_cb(GObject *source, GAsyncResult *result, gpointer u
|
|
||||||
nm_sprintf_buf(iface_idx_str, "%" G_GSSIZE_FORMAT, iface_data->intern_iface_idx);
|
|
||||||
|
|
||||||
while (nm_utils_parse_next_line(&response_str, &response_len, &line, &line_len)) {
|
|
||||||
- gint64 ips_prefix_idx;
|
|
||||||
- gs_free char *uri = NULL;
|
|
||||||
- char buf[100];
|
|
||||||
+ AzureIpAddressReqData *ipaddress_req_data;
|
|
||||||
+ gint64 ips_prefix_idx;
|
|
||||||
+ gs_free char *uri = NULL;
|
|
||||||
+ char buf[100];
|
|
||||||
|
|
||||||
if (line_len == 0)
|
|
||||||
continue;
|
|
||||||
@@ -284,8 +295,11 @@ _get_config_ips_prefix_list_cb(GObject *source, GAsyncResult *result, gpointer u
|
|
||||||
if (ips_prefix_idx < 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
- iface_data->n_iface_data_pending++;
|
|
||||||
+ ipaddress_req_data = g_new(AzureIpAddressReqData, 1);
|
|
||||||
+ ipaddress_req_data->iface_data = iface_data;
|
|
||||||
+ ipaddress_req_data->ipaddress_idx = ips_prefix_idx;
|
|
||||||
|
|
||||||
+ iface_data->n_iface_data_pending++;
|
|
||||||
nm_http_client_poll_req(
|
|
||||||
NM_HTTP_CLIENT(source),
|
|
||||||
(uri = _azure_uri_interfaces(iface_idx_str,
|
|
||||||
@@ -302,11 +316,12 @@ _get_config_ips_prefix_list_cb(GObject *source, GAsyncResult *result, gpointer u
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
_get_config_fetch_done_cb_ipv4_ipaddress_x_privateipaddress,
|
|
||||||
- iface_data);
|
|
||||||
+ ipaddress_req_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
- iface_data->iface_get_config->ipv4s_len = 0;
|
|
||||||
iface_data->iface_get_config->ipv4s_arr = g_new(in_addr_t, iface_data->n_iface_data_pending);
|
|
||||||
+ iface_data->iface_get_config->has_ipv4s = TRUE;
|
|
||||||
+ iface_data->iface_get_config->ipv4s_len = iface_data->n_iface_data_pending;
|
|
||||||
|
|
||||||
{
|
|
||||||
gs_free char *uri = NULL;
|
|
||||||
--
|
|
||||||
2.46.0
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
|||||||
From d9dd0aeff8ba2e1a0005c2e5751907c453927c5c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Gris Ge <fge@redhat.com>
|
|
||||||
Date: Mon, 21 Oct 2024 21:13:29 +0800
|
|
||||||
Subject: [PATCH] sriov: only valid sriov capacity when enabled
|
|
||||||
|
|
||||||
NetworkManager current code will refuse to activate a connection if its
|
|
||||||
interface has no SRIOV capacity but holding a empty SRIOV settings.
|
|
||||||
|
|
||||||
This patch only valid SRIOV capacity when it is enabled(total_vfs > 0).
|
|
||||||
|
|
||||||
Resolves: https://issues.redhat.com/browse/RHEL-58397
|
|
||||||
|
|
||||||
Signed-off-by: Gris Ge <fge@redhat.com>
|
|
||||||
(cherry picked from commit 421ccf8b4cb85c96db3bf1cb6a860e41a784c950)
|
|
||||||
(cherry picked from commit c9e31e70cbf62c65cec460dc198712a61351e9f4)
|
|
||||||
(cherry picked from commit 90a3b014683c3c98c9fb4bbe2add65510e7f1b31)
|
|
||||||
---
|
|
||||||
src/core/devices/nm-device.c | 19 ++++++++++---------
|
|
||||||
1 file changed, 10 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
|
|
||||||
index 4780003a0a..e86c32a902 100644
|
|
||||||
--- a/src/core/devices/nm-device.c
|
|
||||||
+++ b/src/core/devices/nm-device.c
|
|
||||||
@@ -9468,6 +9468,7 @@ check_connection_compatible(NMDevice *self,
|
|
||||||
NMSettingMatch *s_match;
|
|
||||||
const GSList *specs;
|
|
||||||
gboolean has_match = FALSE;
|
|
||||||
+ NMSettingSriov *s_sriov = NULL;
|
|
||||||
|
|
||||||
klass = NM_DEVICE_GET_CLASS(self);
|
|
||||||
if (klass->connection_type_check_compatible) {
|
|
||||||
@@ -9485,12 +9486,14 @@ check_connection_compatible(NMDevice *self,
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (!nm_device_has_capability(self, NM_DEVICE_CAP_SRIOV)
|
|
||||||
- && nm_connection_get_setting(connection, NM_TYPE_SETTING_SRIOV)) {
|
|
||||||
- nm_utils_error_set_literal(error,
|
|
||||||
- NM_UTILS_ERROR_CONNECTION_AVAILABLE_TEMPORARY,
|
|
||||||
- "device does not support SR-IOV");
|
|
||||||
- return FALSE;
|
|
||||||
+ if (!nm_device_has_capability(self, NM_DEVICE_CAP_SRIOV)) {
|
|
||||||
+ s_sriov = (NMSettingSriov *) nm_connection_get_setting(connection, NM_TYPE_SETTING_SRIOV);
|
|
||||||
+ if (s_sriov && nm_setting_sriov_get_total_vfs(s_sriov)) {
|
|
||||||
+ nm_utils_error_set_literal(error,
|
|
||||||
+ NM_UTILS_ERROR_CONNECTION_AVAILABLE_TEMPORARY,
|
|
||||||
+ "device does not support SR-IOV");
|
|
||||||
+ return FALSE;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
conn_iface = nm_manager_get_connection_iface(NM_MANAGER_GET, connection, NULL, NULL, &local);
|
|
||||||
@@ -10101,7 +10104,7 @@ activate_stage1_device_prepare(NMDevice *self)
|
|
||||||
s_sriov = nm_device_get_applied_setting(self, NM_TYPE_SETTING_SRIOV);
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (s_sriov) {
|
|
||||||
+ if (s_sriov && nm_device_has_capability(self, NM_DEVICE_CAP_SRIOV)) {
|
|
||||||
nm_auto_freev NMPlatformVF **plat_vfs = NULL;
|
|
||||||
gs_free_error GError *error = NULL;
|
|
||||||
NMSriovVF *vf;
|
|
||||||
@@ -10109,8 +10112,6 @@ activate_stage1_device_prepare(NMDevice *self)
|
|
||||||
guint num;
|
|
||||||
guint i;
|
|
||||||
|
|
||||||
- nm_assert(nm_device_has_capability(self, NM_DEVICE_CAP_SRIOV));
|
|
||||||
-
|
|
||||||
autoprobe = nm_setting_sriov_get_autoprobe_drivers(s_sriov);
|
|
||||||
if (autoprobe == NM_TERNARY_DEFAULT) {
|
|
||||||
autoprobe = nm_config_data_get_connection_default_int64(
|
|
||||||
--
|
|
||||||
2.45.2
|
|
||||||
|
|
@ -1,136 +0,0 @@
|
|||||||
From 3b1181dc02172033d8e2bb7fd2336b2ea0355a87 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
Date: Mon, 23 Sep 2024 17:28:03 +0200
|
|
||||||
Subject: [PATCH] device: fix bug when deactivating port connections
|
|
||||||
asynchronously
|
|
||||||
|
|
||||||
When the attach_port()/detach_port() methods do not return immediately
|
|
||||||
(currently, only for OVS ports), the following situation can arise:
|
|
||||||
|
|
||||||
- nm_device_controller_attach_port() starts the attachment by sending
|
|
||||||
the command to ovsdb. Note that here we don't set
|
|
||||||
`PortInfo->port_is_attached` to TRUE yet; that happens only after
|
|
||||||
the asynchronous command returns;
|
|
||||||
|
|
||||||
- the activation of the port gets interrupted because the connection
|
|
||||||
is deleted;
|
|
||||||
|
|
||||||
- the port device enters the deactivating state, triggering function
|
|
||||||
port_state_changed()
|
|
||||||
|
|
||||||
- the function calls nm_device_controller_release_port() which checks
|
|
||||||
whether the port is already attached; since
|
|
||||||
`PortInfo->port_is_attached` is not set yet, it assumes the port
|
|
||||||
doesn't need to be detached;
|
|
||||||
|
|
||||||
- in the meantime, the ovsdb operation succeeds. As a consequence,
|
|
||||||
the kernel link is created even if the connection no longer exists.
|
|
||||||
|
|
||||||
Fix this by turning `port_is_attached` into a tri-state variable that
|
|
||||||
also tracks when the port is attaching. When it is, we need to perform
|
|
||||||
an explicit detach during deactivation.
|
|
||||||
|
|
||||||
Fixes: 9fcbc6b37dec ('device: make attach_port() asynchronous')
|
|
||||||
|
|
||||||
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2043
|
|
||||||
|
|
||||||
Resolves: https://issues.redhat.com/browse/RHEL-58026
|
|
||||||
(cherry picked from commit a8329587c8bdd53e2bc4513a4e82529727cfa5ef)
|
|
||||||
(cherry picked from commit d809ca6db24b5145fcc1857b962afb7ae17d07a5)
|
|
||||||
(cherry picked from commit ca6ca684b21235f706b02cee42075f2ee3cb1795)
|
|
||||||
---
|
|
||||||
src/core/devices/nm-device.c | 27 ++++++++++++++++++++++-----
|
|
||||||
1 file changed, 22 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
|
|
||||||
index e86c32a902..f9a2e7e8fe 100644
|
|
||||||
--- a/src/core/devices/nm-device.c
|
|
||||||
+++ b/src/core/devices/nm-device.c
|
|
||||||
@@ -126,12 +126,18 @@ typedef enum _nm_packed {
|
|
||||||
ADDR_METHOD_STATE_FAILED,
|
|
||||||
} AddrMethodState;
|
|
||||||
|
|
||||||
+typedef enum {
|
|
||||||
+ PORT_STATE_NOT_ATTACHED,
|
|
||||||
+ PORT_STATE_ATTACHED,
|
|
||||||
+ PORT_STATE_ATTACHING,
|
|
||||||
+} PortState;
|
|
||||||
+
|
|
||||||
typedef struct {
|
|
||||||
CList lst_port;
|
|
||||||
NMDevice *port;
|
|
||||||
GCancellable *cancellable;
|
|
||||||
gulong watch_id;
|
|
||||||
- bool port_is_attached;
|
|
||||||
+ PortState port_state;
|
|
||||||
bool configure;
|
|
||||||
} PortInfo;
|
|
||||||
|
|
||||||
@@ -6693,7 +6699,7 @@ attach_port_done(NMDevice *self, NMDevice *port, gboolean success)
|
|
||||||
if (!info)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- info->port_is_attached = success;
|
|
||||||
+ info->port_state = (success ? PORT_STATE_ATTACHED : PORT_STATE_NOT_ATTACHED);
|
|
||||||
|
|
||||||
nm_device_port_notify_attach_as_port(info->port, success);
|
|
||||||
|
|
||||||
@@ -6756,7 +6762,7 @@ nm_device_controller_attach_port(NMDevice *self, NMDevice *port, NMConnection *c
|
|
||||||
if (!info)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- if (info->port_is_attached)
|
|
||||||
+ if (info->port_state == PORT_STATE_ATTACHED)
|
|
||||||
success = TRUE;
|
|
||||||
else {
|
|
||||||
configure = (info->configure && connection != NULL);
|
|
||||||
@@ -6765,6 +6771,7 @@ nm_device_controller_attach_port(NMDevice *self, NMDevice *port, NMConnection *c
|
|
||||||
|
|
||||||
nm_clear_g_cancellable(&info->cancellable);
|
|
||||||
info->cancellable = g_cancellable_new();
|
|
||||||
+ info->port_state = PORT_STATE_ATTACHING;
|
|
||||||
success = NM_DEVICE_GET_CLASS(self)->attach_port(self,
|
|
||||||
port,
|
|
||||||
connection,
|
|
||||||
@@ -6819,6 +6826,7 @@ nm_device_controller_release_port(NMDevice *self,
|
|
||||||
PortInfo *info;
|
|
||||||
gs_unref_object NMDevice *self_free = NULL;
|
|
||||||
gs_unref_object NMDevice *port_free = NULL;
|
|
||||||
+ const char *port_state_str;
|
|
||||||
|
|
||||||
g_return_if_fail(NM_DEVICE(self));
|
|
||||||
g_return_if_fail(NM_DEVICE(port));
|
|
||||||
@@ -6830,11 +6838,20 @@ nm_device_controller_release_port(NMDevice *self,
|
|
||||||
|
|
||||||
info = find_port_info(self, port);
|
|
||||||
|
|
||||||
+ if (info->port_state == PORT_STATE_ATTACHED)
|
|
||||||
+ port_state_str = "(attached)";
|
|
||||||
+ else if (info->port_state == PORT_STATE_NOT_ATTACHED)
|
|
||||||
+ port_state_str = "(not attached)";
|
|
||||||
+ else {
|
|
||||||
+ nm_assert(info->port_state == PORT_STATE_ATTACHING);
|
|
||||||
+ port_state_str = "(attaching)";
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
_LOGT(LOGD_CORE,
|
|
||||||
"controller: release one port " NM_HASH_OBFUSCATE_PTR_FMT "/%s %s%s",
|
|
||||||
NM_HASH_OBFUSCATE_PTR(port),
|
|
||||||
nm_device_get_iface(port),
|
|
||||||
- !info ? "(not registered)" : (info->port_is_attached ? "(attached)" : "(not attached)"),
|
|
||||||
+ !info ? "(not registered)" : port_state_str,
|
|
||||||
release_type == RELEASE_PORT_TYPE_CONFIG_FORCE
|
|
||||||
? " (force-configure)"
|
|
||||||
: (release_type == RELEASE_PORT_TYPE_CONFIG ? " (configure)" : "(no-config)"));
|
|
||||||
@@ -6850,7 +6867,7 @@ nm_device_controller_release_port(NMDevice *self,
|
|
||||||
nm_clear_g_cancellable(&info->cancellable);
|
|
||||||
|
|
||||||
/* first, let subclasses handle the release ... */
|
|
||||||
- if (info->port_is_attached || nm_device_sys_iface_state_is_external(port)
|
|
||||||
+ if (info->port_state != PORT_STATE_NOT_ATTACHED || nm_device_sys_iface_state_is_external(port)
|
|
||||||
|| release_type >= RELEASE_PORT_TYPE_CONFIG_FORCE) {
|
|
||||||
NMTernary ret;
|
|
||||||
|
|
||||||
--
|
|
||||||
2.45.2
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
|||||||
From fd2768da4c3f966a215f01f09f8b5d7d534d0193 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
Date: Tue, 24 Sep 2024 16:25:03 +0200
|
|
||||||
Subject: [PATCH] libnm-core: fix validation of ovs-dpdk interface name
|
|
||||||
|
|
||||||
An ovs-dpdk interface doesn't have a kernel link and doesn't have the
|
|
||||||
15-character limit on the name.
|
|
||||||
|
|
||||||
Fixes: 3efe070dfc7a ('libnm: validate "connection.interface-name" at one place only')
|
|
||||||
|
|
||||||
Resolves: https://issues.redhat.com/browse/RHEL-60233
|
|
||||||
|
|
||||||
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2044
|
|
||||||
(cherry picked from commit fda05b0af085d9f7e4cc5691075dae63e7bf02a6)
|
|
||||||
(cherry picked from commit f6e4e537757a414cc896bc1b402da8c9c9e32eaa)
|
|
||||||
(cherry picked from commit c7035db5b43beff7ad7e91685ff17982a540d8e2)
|
|
||||||
---
|
|
||||||
src/libnm-core-impl/nm-setting-connection.c | 4 ++--
|
|
||||||
src/libnm-core-impl/tests/test-general.c | 2 +-
|
|
||||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/libnm-core-impl/nm-setting-connection.c b/src/libnm-core-impl/nm-setting-connection.c
|
|
||||||
index b51cd46bdd..3298dce60a 100644
|
|
||||||
--- a/src/libnm-core-impl/nm-setting-connection.c
|
|
||||||
+++ b/src/libnm-core-impl/nm-setting-connection.c
|
|
||||||
@@ -1379,13 +1379,13 @@ verify(NMSetting *setting, NMConnection *connection, GError **error)
|
|
||||||
if (connection)
|
|
||||||
goto after_interface_name;
|
|
||||||
iface_type = NMU_IFACE_ANY;
|
|
||||||
- } else if (NM_IN_STRSET(ovs_iface_type, "patch")) {
|
|
||||||
+ } else if (NM_IN_STRSET(ovs_iface_type, "patch", "dpdk")) {
|
|
||||||
/* this interface type is internal to OVS. */
|
|
||||||
iface_type = NMU_IFACE_OVS;
|
|
||||||
} else {
|
|
||||||
/* This interface type also requires a netdev. We need to validate
|
|
||||||
* for both OVS and KERNEL. */
|
|
||||||
- nm_assert(NM_IN_STRSET(ovs_iface_type, "internal", "system", "dpdk"));
|
|
||||||
+ nm_assert(NM_IN_STRSET(ovs_iface_type, "internal", "system"));
|
|
||||||
iface_type = NMU_IFACE_OVS_AND_KERNEL;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
diff --git a/src/libnm-core-impl/tests/test-general.c b/src/libnm-core-impl/tests/test-general.c
|
|
||||||
index 0a39010c11..8d4ea069c5 100644
|
|
||||||
--- a/src/libnm-core-impl/tests/test-general.c
|
|
||||||
+++ b/src/libnm-core-impl/tests/test-general.c
|
|
||||||
@@ -10832,7 +10832,7 @@ test_connection_ovs_ifname(gconstpointer test_data)
|
|
||||||
/* good if bridge, port, or patch interface */
|
|
||||||
g_object_set(s_con, NM_SETTING_CONNECTION_INTERFACE_NAME, "ovs123123123123130123123", NULL);
|
|
||||||
|
|
||||||
- if (!ovs_iface_type || nm_streq(ovs_iface_type, "patch"))
|
|
||||||
+ if (!ovs_iface_type || NM_IN_STRSET(ovs_iface_type, "patch", "dpdk"))
|
|
||||||
nmtst_assert_connection_verifies(con);
|
|
||||||
else {
|
|
||||||
nmtst_assert_connection_unnormalizable(con,
|
|
||||||
--
|
|
||||||
2.45.2
|
|
||||||
|
|
Loading…
Reference in new issue