Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package NetworkManager for openSUSE:Factory 
checked in at 2026-08-01 18:28:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/NetworkManager (Old)
 and      /work/SRC/openSUSE:Factory/.NetworkManager.new.16738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "NetworkManager"

Sat Aug  1 18:28:50 2026 rev:294 rq:1368515 version:1.56.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/NetworkManager/NetworkManager.changes    
2026-07-02 22:19:16.809134485 +0200
+++ /work/SRC/openSUSE:Factory/.NetworkManager.new.16738/NetworkManager.changes 
2026-08-01 18:29:46.972696973 +0200
@@ -1,0 +2,10 @@
+Tue Jul 28 02:12:42 UTC 2026 - Jonathan Kang <[email protected]>
+
+- Add 2462.patch: nm-initrd-generator: set parent for NBFT
+  vlan connection
+  (bsc#1259025, glfd#NetworkManager/NetworkManager!2462).
+- Add NetworkManager-initrd-generator-ip-hcn.patch: handle "ip=hcn"
+  option in nm-initrd-generator, it generates an empty connection
+  (PED-14534).
+
+-------------------------------------------------------------------

New:
----
  2462.patch
  NetworkManager-initrd-generator-ip-hcn.patch

----------(New B)----------
  New:
- Add 2462.patch: nm-initrd-generator: set parent for NBFT
  vlan connection
  New:  (bsc#1259025, glfd#NetworkManager/NetworkManager!2462).
- Add NetworkManager-initrd-generator-ip-hcn.patch: handle "ip=hcn"
  option in nm-initrd-generator, it generates an empty connection
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ NetworkManager.spec ++++++
--- /var/tmp/diff_new_pack.bIspq7/_old  2026-08-01 18:29:48.676754978 +0200
+++ /var/tmp/diff_new_pack.bIspq7/_new  2026-08-01 18:29:48.680755113 +0200
@@ -102,6 +102,10 @@
 Patch13:        2312.patch
 # PATCH-FIX-UPSTREAM 
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2308.patch
 Patch14:        2308.patch
+# PATCH-FIX-UPSTREAM 2462.patch bsc#1259025, 
glfd#NetworkManager/NetworkManager!2462 [email protected] --  
nm-initrd-generator: set parent for NBFT vlan connection
+Patch15:        2462.patch
+# PATCH-FEATURE-SLE NetworkManager-initrd-generator-ip-hcn.patch PED-14534 
[email protected] -- handle "ip=hcn" option in nm-initrd-generator, it generates 
an empty connection
+Patch16:        NetworkManager-initrd-generator-ip-hcn.patch
 
 BuildRequires:  c++_compiler
 BuildRequires:  dnsmasq
@@ -329,6 +333,10 @@
 %patch -P 11 -p1
 %patch -P 13 -p1
 %patch -P 14 -p1
+%patch -P 15 -p1
+%if 0%{?sle_version} && 0%{?sle_version} > 160000
+%patch -P 16 -p1
+%endif
 
 # Fix server.conf's location, to end up in %%{_defaultdocdir}/%%{name},
 # rather then %%{_datadir}/doc/%%{name}/examples:

++++++ 2462.patch ++++++
>From c5c81588d55b45798cc50b5c873613cde7835f92 Mon Sep 17 00:00:00 2001
From: Martin Wilck <[email protected]>
Date: Tue, 14 Jul 2026 13:43:06 +0200
Subject: [PATCH 1/2] nm-initrd-generator: set parent for NBFT vlan connection

If the NBFT contains VLAN connections, a race condition can occur between 
creation
of the VLAN interface and renaming of the parent interface. The VLAN
connection is set up on the interface before renaming it, and when
NetworkManager tries to set it up on the renamed interface again later,
the setup fails:

platform-linux: do-add-link[enp2s0.2/vlan]: failure 17 (File exists - 8021q: 
VLAN device already exists)

Fix this by adding an explicit "vlan.parent" setting to the VLAN interface
configuration in nm-initrd-generator.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/work_items/1903

Fixes: d38cbfb3d1ec ('initrd: VLAN support for the NBFT parser')
Suggested-by: Jonathan Kang <[email protected]>
Signed-off-by: Martin Wilck <[email protected]>
---
 src/nm-initrd-generator/nmi-nbft-reader.c     |  6 +++
 .../tests/test-nbft-reader.c                  | 51 +++++++++++--------
 2 files changed, 35 insertions(+), 22 deletions(-)

diff --git a/src/nm-initrd-generator/nmi-nbft-reader.c 
b/src/nm-initrd-generator/nmi-nbft-reader.c
index dfab0390af..a4e0aae34f 100644
--- a/src/nm-initrd-generator/nmi-nbft-reader.c
+++ b/src/nm-initrd-generator/nmi-nbft-reader.c
@@ -162,7 +162,9 @@ parse_hfi(GPtrArray *a, struct nbft_info_hfi *hfi, const 
char *table_name, char
     gs_free char                         *conn_name = NULL;
     gs_unref_object NMSetting            *s_ip4     = NULL;
     gs_unref_object NMSetting            *s_ip6     = NULL;
+    NMSettingConnection                  *s_con     = NULL;
     nm_auto_unref_ip_address NMIPAddress *ipaddr    = NULL;
+    const char                           *parent_uuid;
     guint                                 prefix;
     gs_free_error GError                 *error  = NULL;
     int                                   family = AF_UNSPEC;
@@ -218,6 +220,10 @@ parse_hfi(GPtrArray *a, struct nbft_info_hfi *hfi, const 
char *table_name, char
 
         s_vlan = nm_setting_vlan_new();
         g_object_set(s_vlan, NM_SETTING_VLAN_ID, hfi->tcp_info.vlan, NULL);
+        s_con = nm_connection_get_setting_connection(parent_connection);
+        nm_assert(s_con);
+        parent_uuid = nm_setting_connection_get_uuid(s_con);
+        g_object_set(s_vlan, NM_SETTING_VLAN_PARENT, parent_uuid, NULL);
         nm_connection_add_setting(connection, s_vlan);
     } else {
         /* No VLANS */
diff --git a/src/nm-initrd-generator/tests/test-nbft-reader.c 
b/src/nm-initrd-generator/tests/test-nbft-reader.c
index f93d3d764c..ff86c190de 100644
--- a/src/nm-initrd-generator/tests/test-nbft-reader.c
+++ b/src/nm-initrd-generator/tests/test-nbft-reader.c
@@ -44,7 +44,10 @@ find_connection_for_mac(NMConnection **nbft_connections, 
const char *expected_ma
 }
 
 static void
-verify_connection(NMConnection *c, const char *expected_mac, guint32 
expected_vlan_id)
+verify_connection(NMConnection *c,
+                  const char   *expected_mac,
+                  guint32       expected_vlan_id,
+                  const char   *expected_parent)
 {
     NMSettingConnection *s_con;
     NMSettingWired      *s_wired;
@@ -74,7 +77,7 @@ verify_connection(NMConnection *c, const char *expected_mac, 
guint32 expected_vl
         s_vlan = nm_connection_get_setting_vlan(c);
         g_assert(s_vlan);
         g_assert_cmpint(nm_setting_vlan_get_id(s_vlan), ==, expected_vlan_id);
-        g_assert_cmpstr(nm_setting_vlan_get_parent(s_vlan), ==, NULL);
+        g_assert_cmpstr(nm_setting_vlan_get_parent(s_vlan), ==, 
expected_parent);
     } else {
         g_assert_cmpstr(nm_setting_connection_get_connection_type(s_con),
                         ==,
@@ -208,42 +211,42 @@ test_read_nbft_ipv4_static(void)
     /* NBFT-multi HFI 1 */
     expected_mac_address = "52:54:00:72:c5:ae";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
-    verify_connection(connection, expected_mac_address, 0);
+    verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4(connection, "192.168.122.158", 24, "192.168.122.1");
     verify_ipv6_disabled(connection);
 
     /* NBFT-multi HFI 2 */
     expected_mac_address = "52:54:00:72:c5:af";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
-    verify_connection(connection, expected_mac_address, 0);
+    verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4_dhcp(connection);
     verify_ipv6_disabled(connection);
 
     /* NBFT-Dell.PowerEdge.R660-fw1.5.5-mpath+discovery HFI 1 */
     expected_mac_address = "00:62:0b:cb:eb:70";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
-    verify_connection(connection, expected_mac_address, 0);
+    verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4(connection, "172.18.240.1", 24, NULL);
     verify_ipv6_disabled(connection);
 
     /* NBFT-Dell.PowerEdge.R660-fw1.5.5-mpath+discovery HFI 2 */
     expected_mac_address = "00:62:0b:cb:eb:71";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
-    verify_connection(connection, expected_mac_address, 0);
+    verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4(connection, "172.18.230.2", 24, NULL);
     verify_ipv6_disabled(connection);
 
     /* NBFT-rhpoc */
     expected_mac_address = "ea:eb:d3:58:89:58";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
-    verify_connection(connection, expected_mac_address, 0);
+    verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4(connection, "192.168.101.30", 24, NULL);
     verify_ipv6_disabled(connection);
 
     /* NBFT-static-ipv4 */
     expected_mac_address = "52:54:00:b8:19:b9";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
-    verify_connection(connection, expected_mac_address, 0);
+    verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4(connection, "192.168.49.50", 24, NULL);
     verify_ipv6_disabled(connection);
 
@@ -265,14 +268,14 @@ test_read_nbft_ipv4_dhcp(void)
     /* NBFT-dhcp-ipv4 */
     expected_mac_address = "52:54:00:b8:19:b9";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
-    verify_connection(connection, expected_mac_address, 0);
+    verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4_dhcp(connection);
     verify_ipv6_disabled(connection);
 
     /* NBFT-Dell.PowerEdge.R760 */
     expected_mac_address = "b0:26:28:e8:7c:0e";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
-    verify_connection(connection, expected_mac_address, 0);
+    verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4_dhcp(connection);
     verify_ipv6_disabled(connection);
 
@@ -294,7 +297,7 @@ test_read_nbft_ipv6_static(void)
     /* NBFT-static-ipv6 */
     expected_mac_address = "52:54:00:9e:20:1a";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
-    verify_connection(connection, expected_mac_address, 0);
+    verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv6(connection, "fd09:9a46:b5c1:1fe::10", 64, NULL);
     verify_ipv4_disabled(connection);
 
@@ -316,21 +319,21 @@ test_read_nbft_ipv6_auto(void)
     /* NBFT-auto-ipv6 */
     expected_mac_address = "52:54:00:9e:20:1a";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
-    verify_connection(connection, expected_mac_address, 0);
+    verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv6(connection, "fd09:9a46:b5c1:1ff:5054:ff:fe9e:201a", 64, NULL);
     verify_ipv4_disabled(connection);
 
     /* NBFT-dhcp-ipv6 */
     expected_mac_address = "52:54:00:b8:19:b9";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
-    verify_connection(connection, expected_mac_address, 0);
+    verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv6_auto(connection);
     verify_ipv4_disabled(connection);
 
     /* NBFT-ipv6-noip+disc */
     expected_mac_address = "40:a6:b7:c0:8a:c9";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
-    verify_connection(connection, expected_mac_address, 0);
+    verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv6_auto(connection);
     verify_ipv4_disabled(connection);
 
@@ -340,10 +343,12 @@ test_read_nbft_ipv6_auto(void)
 static void
 test_read_nbft_vlan(void)
 {
-    NMConnection **nbft_connections;
-    NMConnection  *connection;
-    const char    *expected_mac_address;
-    gs_free char  *hostname = NULL;
+    NMConnection       **nbft_connections;
+    NMConnection        *connection;
+    NMSettingConnection *s_conn;
+    const char          *expected_mac_address;
+    gs_free char        *hostname = NULL;
+    const char          *parent;
 
     nbft_connections = nmi_nbft_reader_parse(TEST_INITRD_DIR "/nbft-vlan", 
&hostname);
     g_assert_cmpstr(hostname, ==, NULL);
@@ -352,28 +357,30 @@ test_read_nbft_vlan(void)
     /* NBFT-qemu-vlans-incomplete HFI 1 */
     expected_mac_address = "52:54:00:72:c5:ae";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
-    verify_connection(connection, expected_mac_address, 0);
+    verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4(connection, "192.168.122.158", 24, "192.168.122.1");
     verify_ipv6_disabled(connection);
 
     /* NBFT-qemu-vlans-incomplete HFI 2 */
     expected_mac_address = "52:54:00:72:c5:af";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
-    verify_connection(connection, expected_mac_address, 0);
+    s_conn               = nm_connection_get_setting_connection(connection);
+    parent               = nm_setting_connection_get_uuid(s_conn);
+    verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4_disabled(connection);
     verify_ipv6_disabled(connection);
 
     /* NBFT-qemu-vlans-incomplete HFI 2 VLAN 11 */
     expected_mac_address = "52:54:00:72:c5:af";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 11);
-    verify_connection(connection, expected_mac_address, 11);
+    verify_connection(connection, expected_mac_address, 11, parent);
     verify_ipv4(connection, "192.168.124.58", 24, NULL);
     verify_ipv6_disabled(connection);
 
     /* NBFT-qemu-vlans-incomplete HFI 2 VLAN 12 */
     expected_mac_address = "52:54:00:72:c5:af";
     connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 12);
-    verify_connection(connection, expected_mac_address, 12);
+    verify_connection(connection, expected_mac_address, 12, parent);
     verify_ipv4(connection, "192.168.125.58", 24, NULL);
     verify_ipv6_disabled(connection);
 
-- 
GitLab


>From 26acd1932c0bbe08f75cafc2e48867da049cae54 Mon Sep 17 00:00:00 2001
From: Martin Wilck <[email protected]>
Date: Wed, 15 Jul 2026 20:54:46 +0200
Subject: [PATCH 2/2] nm-initrd-generator: drop MAC address property for NBFT
 vlan connection

Now that we set the parent device explicitly, we don't need to
store the MAC address property in the VLAN connection any more.

This requires changes for the NBFT test code, too.

Signed-off-by: Martin Wilck <[email protected]>
---
 src/nm-initrd-generator/nmi-nbft-reader.c     | 12 +--
 .../tests/test-nbft-reader.c                  | 87 +++++++++++--------
 2 files changed, 60 insertions(+), 39 deletions(-)

diff --git a/src/nm-initrd-generator/nmi-nbft-reader.c 
b/src/nm-initrd-generator/nmi-nbft-reader.c
index a4e0aae34f..d94ad353c7 100644
--- a/src/nm-initrd-generator/nmi-nbft-reader.c
+++ b/src/nm-initrd-generator/nmi-nbft-reader.c
@@ -144,10 +144,12 @@ create_wired_conn(struct nbft_info_hfi *hfi,
                  NULL);
     nm_connection_add_setting(connection, s_connection);
 
-    /* MAC address */
-    s_wired = nm_setting_wired_new();
-    g_object_set(s_wired, NM_SETTING_WIRED_MAC_ADDRESS, hwaddr, NULL);
-    nm_connection_add_setting(connection, s_wired);
+    if (hwaddr) {
+        /* MAC address */
+        s_wired = nm_setting_wired_new();
+        g_object_set(s_wired, NM_SETTING_WIRED_MAC_ADDRESS, hwaddr, NULL);
+        nm_connection_add_setting(connection, s_wired);
+    }
 
     return connection;
 }
@@ -216,7 +218,7 @@ parse_hfi(GPtrArray *a, struct nbft_info_hfi *hfi, const 
char *table_name, char
         }
 
         conn_name  = format_conn_name(table_name, hfi, TRUE);
-        connection = create_wired_conn(hfi, conn_name, hwaddr, TRUE);
+        connection = create_wired_conn(hfi, conn_name, NULL, TRUE);
 
         s_vlan = nm_setting_vlan_new();
         g_object_set(s_vlan, NM_SETTING_VLAN_ID, hfi->tcp_info.vlan, NULL);
diff --git a/src/nm-initrd-generator/tests/test-nbft-reader.c 
b/src/nm-initrd-generator/tests/test-nbft-reader.c
index ff86c190de..1487d5cfdb 100644
--- a/src/nm-initrd-generator/tests/test-nbft-reader.c
+++ b/src/nm-initrd-generator/tests/test-nbft-reader.c
@@ -15,27 +15,44 @@
 /*****************************************************************************/
 
 static NMConnection *
-find_connection_for_mac(NMConnection **nbft_connections, const char 
*expected_mac, guint32 vlan_id)
+find_connection_for_mac(NMConnection **nbft_connections, const char 
*expected_mac)
 {
     NMConnection  **c;
     NMSettingWired *s_wired;
-    NMSettingVlan  *s_vlan;
     const char     *mac_address;
 
     for (c = nbft_connections; c && *c; c++) {
         s_wired = nm_connection_get_setting_wired(*c);
-        g_assert(s_wired);
+        if (!s_wired)
+            continue;
         mac_address = nm_setting_wired_get_mac_address(s_wired);
         g_assert(mac_address);
         if (!nm_utils_hwaddr_matches(mac_address, -1, expected_mac, -1))
             continue;
+        return *c;
+    }
+
+    return NULL;
+}
+
+static NMConnection *
+find_connection_for_parent(NMConnection **nbft_connections, const char *uuid, 
guint32 vlan_id)
+{
+    NMConnection **c;
+    NMSettingVlan *s_vlan;
+    const char    *parent;
+
+    g_assert(uuid);
+    g_assert(vlan_id > 0);
+    for (c = nbft_connections; c && *c; c++) {
         s_vlan = nm_connection_get_setting_vlan(*c);
-        if (vlan_id > 0) {
-            if (!s_vlan)
-                continue;
-            if (nm_setting_vlan_get_id(s_vlan) != vlan_id)
-                continue;
-        } else if (s_vlan)
+        if (!s_vlan)
+            continue;
+        if (nm_setting_vlan_get_id(s_vlan) != vlan_id)
+            continue;
+        parent = nm_setting_vlan_get_parent(s_vlan);
+        g_assert(parent);
+        if (!nm_streq(uuid, parent))
             continue;
         return *c;
     }
@@ -64,11 +81,13 @@ verify_connection(NMConnection *c,
     g_assert(nm_setting_connection_get_autoconnect_priority(s_con)
              == NMI_AUTOCONNECT_PRIORITY_FIRMWARE);
 
-    s_wired = nm_connection_get_setting_wired(c);
-    g_assert(s_wired);
-    mac_address = nm_setting_wired_get_mac_address(s_wired);
-    g_assert(mac_address);
-    g_assert(nm_utils_hwaddr_matches(mac_address, -1, expected_mac, -1));
+    if (expected_mac) {
+        s_wired = nm_connection_get_setting_wired(c);
+        g_assert(s_wired);
+        mac_address = nm_setting_wired_get_mac_address(s_wired);
+        g_assert(mac_address);
+        g_assert(nm_utils_hwaddr_matches(mac_address, -1, expected_mac, -1));
+    }
 
     if (expected_vlan_id > 0) {
         g_assert_cmpstr(nm_setting_connection_get_connection_type(s_con),
@@ -210,42 +229,42 @@ test_read_nbft_ipv4_static(void)
 
     /* NBFT-multi HFI 1 */
     expected_mac_address = "52:54:00:72:c5:ae";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
+    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address);
     verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4(connection, "192.168.122.158", 24, "192.168.122.1");
     verify_ipv6_disabled(connection);
 
     /* NBFT-multi HFI 2 */
     expected_mac_address = "52:54:00:72:c5:af";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
+    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address);
     verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4_dhcp(connection);
     verify_ipv6_disabled(connection);
 
     /* NBFT-Dell.PowerEdge.R660-fw1.5.5-mpath+discovery HFI 1 */
     expected_mac_address = "00:62:0b:cb:eb:70";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
+    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address);
     verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4(connection, "172.18.240.1", 24, NULL);
     verify_ipv6_disabled(connection);
 
     /* NBFT-Dell.PowerEdge.R660-fw1.5.5-mpath+discovery HFI 2 */
     expected_mac_address = "00:62:0b:cb:eb:71";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
+    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address);
     verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4(connection, "172.18.230.2", 24, NULL);
     verify_ipv6_disabled(connection);
 
     /* NBFT-rhpoc */
     expected_mac_address = "ea:eb:d3:58:89:58";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
+    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address);
     verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4(connection, "192.168.101.30", 24, NULL);
     verify_ipv6_disabled(connection);
 
     /* NBFT-static-ipv4 */
     expected_mac_address = "52:54:00:b8:19:b9";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
+    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address);
     verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4(connection, "192.168.49.50", 24, NULL);
     verify_ipv6_disabled(connection);
@@ -267,14 +286,14 @@ test_read_nbft_ipv4_dhcp(void)
 
     /* NBFT-dhcp-ipv4 */
     expected_mac_address = "52:54:00:b8:19:b9";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
+    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address);
     verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4_dhcp(connection);
     verify_ipv6_disabled(connection);
 
     /* NBFT-Dell.PowerEdge.R760 */
     expected_mac_address = "b0:26:28:e8:7c:0e";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
+    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address);
     verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4_dhcp(connection);
     verify_ipv6_disabled(connection);
@@ -296,7 +315,7 @@ test_read_nbft_ipv6_static(void)
 
     /* NBFT-static-ipv6 */
     expected_mac_address = "52:54:00:9e:20:1a";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
+    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address);
     verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv6(connection, "fd09:9a46:b5c1:1fe::10", 64, NULL);
     verify_ipv4_disabled(connection);
@@ -318,21 +337,21 @@ test_read_nbft_ipv6_auto(void)
 
     /* NBFT-auto-ipv6 */
     expected_mac_address = "52:54:00:9e:20:1a";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
+    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address);
     verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv6(connection, "fd09:9a46:b5c1:1ff:5054:ff:fe9e:201a", 64, NULL);
     verify_ipv4_disabled(connection);
 
     /* NBFT-dhcp-ipv6 */
     expected_mac_address = "52:54:00:b8:19:b9";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
+    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address);
     verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv6_auto(connection);
     verify_ipv4_disabled(connection);
 
     /* NBFT-ipv6-noip+disc */
     expected_mac_address = "40:a6:b7:c0:8a:c9";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
+    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address);
     verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv6_auto(connection);
     verify_ipv4_disabled(connection);
@@ -356,14 +375,14 @@ test_read_nbft_vlan(void)
 
     /* NBFT-qemu-vlans-incomplete HFI 1 */
     expected_mac_address = "52:54:00:72:c5:ae";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
+    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address);
     verify_connection(connection, expected_mac_address, 0, NULL);
     verify_ipv4(connection, "192.168.122.158", 24, "192.168.122.1");
     verify_ipv6_disabled(connection);
 
     /* NBFT-qemu-vlans-incomplete HFI 2 */
     expected_mac_address = "52:54:00:72:c5:af";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 0);
+    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address);
     s_conn               = nm_connection_get_setting_connection(connection);
     parent               = nm_setting_connection_get_uuid(s_conn);
     verify_connection(connection, expected_mac_address, 0, NULL);
@@ -371,16 +390,16 @@ test_read_nbft_vlan(void)
     verify_ipv6_disabled(connection);
 
     /* NBFT-qemu-vlans-incomplete HFI 2 VLAN 11 */
-    expected_mac_address = "52:54:00:72:c5:af";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 11);
-    verify_connection(connection, expected_mac_address, 11, parent);
+    connection = find_connection_for_parent(nbft_connections, parent, 11);
+    g_assert(connection);
+    verify_connection(connection, NULL, 11, parent);
     verify_ipv4(connection, "192.168.124.58", 24, NULL);
     verify_ipv6_disabled(connection);
 
     /* NBFT-qemu-vlans-incomplete HFI 2 VLAN 12 */
-    expected_mac_address = "52:54:00:72:c5:af";
-    connection           = find_connection_for_mac(nbft_connections, 
expected_mac_address, 12);
-    verify_connection(connection, expected_mac_address, 12, parent);
+    connection = find_connection_for_parent(nbft_connections, parent, 12);
+    g_assert(connection);
+    verify_connection(connection, NULL, 12, parent);
     verify_ipv4(connection, "192.168.125.58", 24, NULL);
     verify_ipv6_disabled(connection);
 
-- 
GitLab


++++++ NetworkManager-initrd-generator-ip-hcn.patch ++++++
>From 3170f2066c3734432eedb594d60a7f7c94228bcf Mon Sep 17 00:00:00 2001
From: Jonathan Kang <[email protected]>
Date: Mon, 27 Jul 2026 08:18:09 +0800
Subject: [PATCH] nm-initrd-generator: support ip=hcn option

For now, this generates an empty connection so that it won't conflict
with ones generator in other dracut modules.
---
 src/nm-initrd-generator/nmi-cmdline-reader.c  | 21 +++++++++-
 .../tests/test-cmdline-reader.c               | 41 +++++++++++++++++++
 2 files changed, 61 insertions(+), 1 deletion(-)

diff --git a/src/nm-initrd-generator/nmi-cmdline-reader.c 
b/src/nm-initrd-generator/nmi-cmdline-reader.c
index 5d91d15796..16da1566e9 100644
--- a/src/nm-initrd-generator/nmi-cmdline-reader.c
+++ b/src/nm-initrd-generator/nmi-cmdline-reader.c
@@ -38,6 +38,10 @@ typedef struct {
     char         *dns_backend;
     char         *dns_resolve_mode;
 
+    /* Whether an "ip=...:hcn" argument was seen. In that case another dracut
+     * module takes care of the configuration and we generate nothing. */
+    gboolean ip_hcn;
+
     /* Parameters to be set for all connections */
     gboolean ignore_auto_dns;
     int      dhcp_timeout;
@@ -453,6 +457,7 @@ _parse_ip_method(const char *kind)
         "link6",
         "auto",
         "ibft",
+        "hcn",
     };
     gs_free char        *kind_to_free = NULL;
     gs_free const char **strv         = NULL;
@@ -621,6 +626,13 @@ reader_parse_ip(Reader *reader, const char *sysfs_dir, 
char *argument)
             }
         }
 
+        if (nm_streq(kind, "hcn")) {
+            /* Another dracut module generates the connection. Ignore the
+             * argument entirely, without applying any of its other parts. */
+            reader->ip_hcn = TRUE;
+            return;
+        }
+
         if (client_hostname && !nm_hostname_is_valid(client_hostname, FALSE))
             client_hostname = NULL;
 
@@ -652,6 +664,12 @@ reader_parse_ip(Reader *reader, const char *sysfs_dir, 
char *argument)
         return;
     }
 
+    if (nm_streq(kind, "hcn")) {
+        /* Another dracut module generates the connection. */
+        reader->ip_hcn = TRUE;
+        return;
+    }
+
     /* Parsing done, construct the NMConnection. */
     if (iface_spec)
         connection = reader_get_connection(reader, iface_spec, NULL, TRUE);
@@ -1776,7 +1794,8 @@ nmi_cmdline_reader_parse(const char        
*etc_connections_dir,
     }
 
     if (neednet) {
-        if (!(etc_connections_dir && g_file_test(etc_connections_dir, 
G_FILE_TEST_IS_DIR))
+        if (!reader->ip_hcn
+            && !(etc_connections_dir && g_file_test(etc_connections_dir, 
G_FILE_TEST_IS_DIR))
             && g_hash_table_size(reader->hash) == 0) {
             /* Make sure there's some connection. */
             reader_get_default_connection(reader);
diff --git a/src/nm-initrd-generator/tests/test-cmdline-reader.c 
b/src/nm-initrd-generator/tests/test-cmdline-reader.c
index b49905fb53..f8927c96af 100644
--- a/src/nm-initrd-generator/tests/test-cmdline-reader.c
+++ b/src/nm-initrd-generator/tests/test-cmdline-reader.c
@@ -2828,6 +2828,46 @@ test_rd_ethtool(void)
 
 /*****************************************************************************/
 
+static void
+test_hcn(void)
+{
+    gs_unref_hashtable GHashTable *connections         = NULL;
+    gs_free char                  *hostname            = NULL;
+    gint64                         carrier_timeout_sec = 0;
+    NMConnection                  *connection;
+    NMSettingConnection           *s_con;
+
+    /* Connections are generated by another dracut module. We generate none. */
+    _parse_no_con(NM_MAKE_STRV("ip=hcn"));
+    _parse_no_con(NM_MAKE_STRV("ip=eth0:hcn"));
+
+    /* Not even the "rd.neednet" fallback connection. */
+    _parse_no_con(NM_MAKE_STRV("rd.neednet=1", "ip=hcn"));
+
+    /* The whole argument is ignored, including the hostname. */
+    connections = 
_parse(NM_MAKE_STRV("ip=192.168.1.5::192.168.1.1:24:myhost:eth0:hcn"),
+                         &hostname,
+                         &carrier_timeout_sec,
+                         NULL,
+                         NULL,
+                         NULL);
+    g_assert_cmpint(g_hash_table_size(connections), ==, 0);
+    g_assert_cmpstr(hostname, ==, NULL);
+    nm_clear_pointer(&connections, g_hash_table_unref);
+
+    /* Other arguments are unaffected. */
+    connections = _parse_cons(NM_MAKE_STRV("ip=hcn", "ip=eth0:dhcp"));
+    g_assert_cmpint(g_hash_table_size(connections), ==, 1);
+    connection = g_hash_table_lookup(connections, "eth0");
+    g_assert(NM_IS_CONNECTION(connection));
+    nmtst_assert_connection_verifies_without_normalization(connection);
+    s_con = nm_connection_get_setting_connection(connection);
+    g_assert(s_con);
+    g_assert_cmpstr(nm_setting_connection_get_interface_name(s_con), ==, 
"eth0");
+}
+
+/*****************************************************************************/
+
 static void
 test_plain_equal_char(void)
 {
@@ -3050,6 +3090,7 @@ main(int argc, char **argv)
     g_test_add_func("/initrd/cmdline/infiniband/pkey", test_infiniband_pkey);
     g_test_add_func("/initrd/cmdline/carrier_timeout", test_carrier_timeout);
     g_test_add_func("/initrd/cmdline/rd_ethtool", test_rd_ethtool);
+    g_test_add_func("/initrd/cmdline/hcn", test_hcn);
     g_test_add_func("/initrd/cmdline/plain_equal_char", test_plain_equal_char);
     g_test_add_func("/initrd/cmdline/global_dns", test_global_dns);
     g_test_add_func("/initrd/cmdline/rd_dhcp_client_id", 
test_rd_dhcp_client_id);
-- 
2.55.0


++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.bIspq7/_old  2026-08-01 18:29:48.868761513 +0200
+++ /var/tmp/diff_new_pack.bIspq7/_new  2026-08-01 18:29:48.872761649 +0200
@@ -1,6 +1,6 @@
-mtime: 1782799880
-commit: 455e9720107124b868140f2e8aa94c14ec34a45b8141176c4722b6479c7fe170
+mtime: 1785282036
+commit: 8764c49842e9c036b43c68a9698d4dff935efbe64efee941a814f28fe27fde55
 url: https://src.opensuse.org/GNOME/NetworkManager
-revision: 455e9720107124b868140f2e8aa94c14ec34a45b8141176c4722b6479c7fe170
+revision: 8764c49842e9c036b43c68a9698d4dff935efbe64efee941a814f28fe27fde55
 projectscmsync: https://src.opensuse.org/GNOME/_ObsPrj
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-07-29 01:40:36.000000000 +0200
@@ -0,0 +1,5 @@
+*.obscpio
+*.osc
+_build.*
+.pbuild
+osc-collab.*

Reply via email to