diff --git a/SOURCES/1020-fix-unauth-user-can-make-nm-crash-rh1890887.patch b/SOURCES/1020-fix-unauth-user-can-make-nm-crash-rh1890887.patch new file mode 100644 index 0000000..d0cbbca --- /dev/null +++ b/SOURCES/1020-fix-unauth-user-can-make-nm-crash-rh1890887.patch @@ -0,0 +1,42 @@ +From 62536f5ebddfca3e57f8771c8480a52fc4d558d1 Mon Sep 17 00:00:00 2001 +From: Antonio Cardace +Date: Thu, 22 Oct 2020 14:40:15 +0200 +Subject: [PATCH 1/1] manager: fix very bad usage of + 'nm_utils_user_data_unpack' + +This results in the args of 'nm_utils_user_data_unpack' +containing random data potentially also from the +previous stack-frame which is really really bad. + +Signed-off-by: Antonio Cardace +Fixes: b50702775f1b ('device: implement auth-request as async operation nm_manager_device_auth_request()') +(cherry picked from commit b6a18e059302117157971e7c5f551fc40d864e89) +(cherry picked from commit 50adaf7414a62f08a309f11941453eae75c9e0e9) +(cherry picked from commit 72a2e34b42e9f6e38ba2fc5b5db96015930827a2) +--- + src/nm-manager.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/src/nm-manager.c b/src/nm-manager.c +index 778e3b946..57f3e8dd9 100644 +--- a/src/nm-manager.c ++++ b/src/nm-manager.c +@@ -2453,7 +2453,14 @@ _device_auth_done_fail_on_idle (gpointer user_data, GCancellable *cancellable) + NMManagerDeviceAuthRequestFunc callback; + gpointer callback_user_data; + +- nm_utils_user_data_unpack (&self, &device, &context, &subject, &error_original, &callback, &callback_user_data); ++ nm_utils_user_data_unpack (user_data, ++ &self, ++ &device, ++ &context, ++ &subject, ++ &error_original, ++ &callback, ++ &callback_user_data); + + g_cancellable_set_error_if_cancelled (cancellable, &error_cancelled); + +-- +2.28.0 + diff --git a/SOURCES/1021-initrd-vlan-fixes-rh1903695-rh1903698.patch b/SOURCES/1021-initrd-vlan-fixes-rh1903695-rh1903698.patch new file mode 100644 index 0000000..a1ab92b --- /dev/null +++ b/SOURCES/1021-initrd-vlan-fixes-rh1903695-rh1903698.patch @@ -0,0 +1,706 @@ +From 61636ae740e7de1ad75202cd1d2adfd506f7d5c0 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Wed, 22 Jul 2020 12:24:59 +0200 +Subject: [PATCH 1/4] shared: add nm_strv_ptrarray_ensure() and + nm_strv_ptrarray_find_first() helpers + +(cherry picked from commit 99296d4c6caee60065286210f1f5fb4d653861bd) +(cherry picked from commit 0ae9e9ec5eddbfd34f073a60819e02aa648e312c) +Signed-off-by: Antonio Cardace +--- + shared/nm-glib-aux/nm-shared-utils.h | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +diff --git a/shared/nm-glib-aux/nm-shared-utils.h b/shared/nm-glib-aux/nm-shared-utils.h +index b17c8d1a0..f33949e61 100644 +--- a/shared/nm-glib-aux/nm-shared-utils.h ++++ b/shared/nm-glib-aux/nm-shared-utils.h +@@ -1771,6 +1771,17 @@ GSource *nm_utils_g_main_context_create_integrate_source (GMainContext *internal + + /*****************************************************************************/ + ++static inline GPtrArray * ++nm_strv_ptrarray_ensure (GPtrArray **p_arr) ++{ ++ nm_assert (p_arr); ++ ++ if (G_UNLIKELY (!*p_arr)) ++ *p_arr = g_ptr_array_new_with_free_func (g_free); ++ ++ return *p_arr; ++} ++ + static inline void + nm_strv_ptrarray_add_string_take (GPtrArray *cmd, + char *str) +@@ -1809,6 +1820,22 @@ nm_strv_ptrarray_take_gstring (GPtrArray *cmd, + FALSE)); + } + ++static inline gssize ++nm_strv_ptrarray_find_first (const GPtrArray *strv, ++ const char *str) ++{ ++ if (!strv) ++ return -1; ++ return nm_utils_strv_find_first ((char **) strv->pdata, strv->len, str); ++} ++ ++static inline gboolean ++nm_strv_ptrarray_contains (const GPtrArray *strv, ++ const char *str) ++{ ++ return nm_strv_ptrarray_find_first (strv, str) >= 0; ++} ++ + /*****************************************************************************/ + + int nm_utils_getpagesize (void); +-- +2.28.0 + + +From 2d5322ba201152f41010a4629a659c424520e2be Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Thu, 19 Nov 2020 11:06:04 +0100 +Subject: [PATCH 2/4] initrd: add test for prefixed address in ip= argument + +(cherry picked from commit 584e9048b3dd7e8c550e56d2da5398516398be0f) +(cherry picked from commit 58a6697e96b19707b0bd07e11c2c646982739e95) +(cherry picked from commit d7361496a207b3476c0da34e7dcc08394914b9a7) +Signed-off-by: Antonio Cardace +--- + src/initrd/tests/test-cmdline-reader.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/initrd/tests/test-cmdline-reader.c b/src/initrd/tests/test-cmdline-reader.c +index d6966023a..565bb9e8f 100644 +--- a/src/initrd/tests/test-cmdline-reader.c ++++ b/src/initrd/tests/test-cmdline-reader.c +@@ -340,7 +340,7 @@ static void + test_multiple_merge (void) + { + gs_unref_hashtable GHashTable *connections = NULL; +- const char *const*ARGV = NM_MAKE_STRV ("ip=192.0.2.2:::::eth0", ++ const char *const*ARGV = NM_MAKE_STRV ("ip=192.0.2.2/16:::::eth0", + "ip=[2001:db8::2]:::56::eth0"); + NMConnection *connection; + NMSettingConnection *s_con; +@@ -375,6 +375,7 @@ test_multiple_merge (void) + ip_addr = nm_setting_ip_config_get_address (s_ip4, 0); + g_assert (ip_addr); + g_assert_cmpstr (nm_ip_address_get_address (ip_addr), ==, "192.0.2.2"); ++ g_assert_cmpint (nm_ip_address_get_prefix (ip_addr), ==, 16); + + s_ip6 = nm_connection_get_setting_ip6_config (connection); + g_assert (s_ip6); +-- +2.28.0 + + +From c6668afd87b53521ad574a7876f25a34f6a9b3f5 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Tue, 17 Nov 2020 11:10:54 +0100 +Subject: [PATCH 3/4] initrd: fix parsing of ip= argument with dotted interface + name + +The command line parser looks for a dot or a colon to determine +whether the first token in a ip= argument is a IPv4 address (dot), an +IPv6 address (colon) or an interface name (none). This strategy +doesn't work for interface names containing a dot (typically VLANs). + +Instead, try to parse the IPv4/IPv6 address in the token; if this +fails then consider the token as an interface name. + +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/581 +(cherry picked from commit 4aa902ecf537fbf14fd483a336b83b2139025681) +(cherry picked from commit f766b3cbae0db7e3b7421bfdffc1d6182717e05c) +(cherry picked from commit a2ce810b87981f586e4acb993f7658c1da06b67e) +Signed-off-by: Antonio Cardace +--- + src/initrd/nm-initrd-generator.h | 24 ++++++++----- + src/initrd/nmi-cmdline-reader.c | 39 +++++++++----------- + src/initrd/nmi-ibft-reader.c | 4 +-- + src/initrd/tests/test-cmdline-reader.c | 49 ++++++++++++++++++++++++++ + 4 files changed, 82 insertions(+), 34 deletions(-) + +diff --git a/src/initrd/nm-initrd-generator.h b/src/initrd/nm-initrd-generator.h +index 8e17f0455..e7647edd7 100644 +--- a/src/initrd/nm-initrd-generator.h ++++ b/src/initrd/nm-initrd-generator.h +@@ -11,17 +11,23 @@ + + #define NMI_WAIT_DEVICE_TIMEOUT_MS 60000 + +-static inline gboolean +-guess_ip_address_family (const char *str) ++static inline int ++get_ip_address_family (const char *str, gboolean with_prefix) + { +- if (str == NULL) +- return AF_UNSPEC; +- else if (strchr (str, '.')) +- return AF_INET; +- else if (strchr (str, ':')) +- return AF_INET6; +- else ++ int addr_family; ++ ++ if (!str) + return AF_UNSPEC; ++ ++ if (with_prefix) { ++ if (nm_utils_parse_inaddr_prefix_bin (AF_UNSPEC, str, &addr_family, NULL, NULL)) ++ return addr_family; ++ } else { ++ if (nm_utils_parse_inaddr_bin (AF_UNSPEC, str, &addr_family, NULL)) ++ return addr_family; ++ } ++ ++ return AF_UNSPEC; + } + + GHashTable *nmi_ibft_read (const char *sysfs_dir); +diff --git a/src/initrd/nmi-cmdline-reader.c b/src/initrd/nmi-cmdline-reader.c +index 257ba3d7a..1b693758f 100644 +--- a/src/initrd/nmi-cmdline-reader.c ++++ b/src/initrd/nmi-cmdline-reader.c +@@ -385,7 +385,7 @@ reader_parse_ip (Reader *reader, const char *sysfs_dir, char *argument) + /* ip={dhcp|on|any|dhcp6|auto6|ibft} */ + kind = tmp; + } else { +- client_ip_family = guess_ip_address_family (tmp); ++ client_ip_family = get_ip_address_family (tmp, TRUE); + if (client_ip_family != AF_UNSPEC) { + /* :[]:::: */ + client_ip = tmp; +@@ -411,11 +411,11 @@ reader_parse_ip (Reader *reader, const char *sysfs_dir, char *argument) + kind = get_word (&argument, ':'); + + tmp = get_word (&argument, ':'); +- dns_addr_family[0] = guess_ip_address_family (tmp); ++ dns_addr_family[0] = get_ip_address_family (tmp, FALSE); + if (dns_addr_family[0] != AF_UNSPEC) { + dns[0] = tmp; + dns[1] = get_word (&argument, ':'); +- dns_addr_family[1] = guess_ip_address_family (dns[1]); ++ dns_addr_family[1] = get_ip_address_family (dns[1], FALSE); + if (*argument) + _LOGW (LOGD_CORE, "Ignoring extra: '%s'.", argument); + } else { +@@ -475,9 +475,8 @@ reader_parse_ip (Reader *reader, const char *sysfs_dir, char *argument) + _LOGW (LOGD_CORE, "Invalid address '%s': %s", client_ip, error->message); + g_clear_error (&error); + } +- } else { +- _LOGW (LOGD_CORE, "Unrecognized address: %s", client_ip); +- } ++ } else ++ nm_assert_not_reached (); + + if (address) { + switch (client_ip_family) { +@@ -496,7 +495,7 @@ reader_parse_ip (Reader *reader, const char *sysfs_dir, char *argument) + nm_setting_ip_config_add_address (s_ip6, address); + break; + default: +- _LOGW (LOGD_CORE, "Unknown address family: %s", client_ip); ++ nm_assert_not_reached (); + break; + } + nm_ip_address_unref (address); +@@ -579,22 +578,16 @@ reader_parse_ip (Reader *reader, const char *sysfs_dir, char *argument) + _LOGW (LOGD_CORE, "Ignoring peer: %s (not implemented)\n", peer); + + if (gateway_ip && *gateway_ip) { +- int addr_family = guess_ip_address_family (gateway_ip); +- +- if (nm_utils_ipaddr_is_valid (addr_family, gateway_ip)) { +- switch (addr_family) { +- case AF_INET: +- g_object_set (s_ip4, NM_SETTING_IP_CONFIG_GATEWAY, gateway_ip, NULL); +- break; +- case AF_INET6: +- g_object_set (s_ip6, NM_SETTING_IP_CONFIG_GATEWAY, gateway_ip, NULL); +- break; +- default: +- _LOGW (LOGD_CORE, "Unknown address family: %s", gateway_ip); +- break; +- } +- } else { ++ switch (get_ip_address_family (gateway_ip, FALSE)) { ++ case AF_INET: ++ g_object_set (s_ip4, NM_SETTING_IP_CONFIG_GATEWAY, gateway_ip, NULL); ++ break; ++ case AF_INET6: ++ g_object_set (s_ip6, NM_SETTING_IP_CONFIG_GATEWAY, gateway_ip, NULL); ++ break; ++ default: + _LOGW (LOGD_CORE, "Invalid gateway: %s", gateway_ip); ++ break; + } + } + +@@ -893,7 +886,7 @@ reader_add_nameservers (Reader *reader, GPtrArray *nameservers) + + for (i = 0; i < nameservers->len; i++) { + ns = nameservers->pdata[i]; +- addr_family = guess_ip_address_family (ns); ++ addr_family = get_ip_address_family (ns, FALSE); + if (addr_family == AF_UNSPEC) { + _LOGW (LOGD_CORE, "Unknown address family: %s", ns); + continue; +diff --git a/src/initrd/nmi-ibft-reader.c b/src/initrd/nmi-ibft-reader.c +index fe6f6432a..bdb99e67e 100644 +--- a/src/initrd/nmi-ibft-reader.c ++++ b/src/initrd/nmi-ibft-reader.c +@@ -162,9 +162,9 @@ ip_setting_add_from_block (GHashTable *nic, + NULL); + } + +- family = guess_ip_address_family (s_ipaddr); ++ family = get_ip_address_family (s_ipaddr, FALSE); + if (family == AF_UNSPEC) +- family = guess_ip_address_family (s_gateway); ++ family = get_ip_address_family (s_gateway, FALSE); + + switch (family) { + case AF_INET: +diff --git a/src/initrd/tests/test-cmdline-reader.c b/src/initrd/tests/test-cmdline-reader.c +index 565bb9e8f..53ddccc27 100644 +--- a/src/initrd/tests/test-cmdline-reader.c ++++ b/src/initrd/tests/test-cmdline-reader.c +@@ -1064,6 +1064,54 @@ test_team (void) + g_assert_cmpint (nm_setting_connection_get_multi_connect (s_con), ==, NM_CONNECTION_MULTI_CONNECT_SINGLE); + } + ++static void ++test_vlan (void) ++{ ++ const char *const *ARGV0 = NM_MAKE_STRV ("ip=eth0.100:dhcp", "vlan=eth0.100:eth0"); ++ const char *const *ARGV1 = NM_MAKE_STRV ("vlan=eth0.100:eth0", "ip=eth0.100:dhcp"); ++ const char *const *ARGV[] = {ARGV0, ARGV1}; ++ guint i; ++ ++ for (i = 0; i < G_N_ELEMENTS (ARGV); i++) { ++ gs_unref_hashtable GHashTable *connections = NULL; ++ NMConnection *connection; ++ NMSettingIPConfig *s_ip4; ++ NMSettingIPConfig *s_ip6; ++ NMSettingVlan *s_vlan; ++ gs_free char *hostname = NULL; ++ ++ connections = nmi_cmdline_reader_parse (TEST_INITRD_DIR "/sysfs", ARGV[i], &hostname); ++ g_assert (connections); ++ g_assert_cmpint (g_hash_table_size (connections), ==, 1); ++ g_assert_cmpstr (hostname, ==, NULL); ++ ++ connection = g_hash_table_lookup (connections, "eth0.100"); ++ g_assert (connection); ++ nmtst_assert_connection_verifies_without_normalization (connection); ++ g_assert_cmpstr (nm_connection_get_connection_type (connection), ++ ==, ++ NM_SETTING_VLAN_SETTING_NAME); ++ g_assert_cmpstr (nm_connection_get_id (connection), ==, "eth0.100"); ++ ++ s_vlan = nm_connection_get_setting_vlan (connection); ++ g_assert (s_vlan); ++ g_assert_cmpstr (nm_setting_vlan_get_parent (s_vlan), ==, "eth0"); ++ g_assert_cmpint (nm_setting_vlan_get_id (s_vlan), ==, 100); ++ ++ s_ip4 = nm_connection_get_setting_ip4_config (connection); ++ g_assert (s_ip4); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip4), ++ ==, ++ NM_SETTING_IP4_CONFIG_METHOD_AUTO); ++ ++ s_ip6 = nm_connection_get_setting_ip6_config (connection); ++ g_assert (s_ip6); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), ++ ==, ++ NM_SETTING_IP6_CONFIG_METHOD_AUTO); ++ } ++} ++ + static void + test_ibft_ip_dev (void) + { +@@ -1675,6 +1723,7 @@ int main (int argc, char **argv) + g_test_add_func ("/initrd/cmdline/bond/ip", test_bond_ip); + g_test_add_func ("/initrd/cmdline/bond/default", test_bond_default); + g_test_add_func ("/initrd/cmdline/team", test_team); ++ g_test_add_func ("/initrd/cmdline/vlan", test_vlan); + g_test_add_func ("/initrd/cmdline/bridge", test_bridge); + g_test_add_func ("/initrd/cmdline/bridge/default", test_bridge_default); + g_test_add_func ("/initrd/cmdline/bridge/ip", test_bridge_ip); +-- +2.28.0 + + +From d7d342fb3c112513dcd5645603b524700d8e208e Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Wed, 18 Nov 2020 14:27:19 +0100 +Subject: [PATCH 4/4] initrd: disable ipv4 and ipv6 by default for vlan parent + connection + +Change the generator to disable by default IP configuration for the +parent connection of a VLAN, because that is what a user would expect +and what the legacy module does. Of course if the user explicitly +configures DHCP or an address for the parent interface, that overrides +the default. + +Note that now the generator always creates a connection for the parent +interface. Before this commit, it did only when there was an explicit +ip= argument for the parent interface. + +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/509 +(cherry picked from commit f2e51ace6815bd1bd264101694b8dc65226ddd90) +(cherry picked from commit 4b0007b0370badc2fcefe529a6e680e8ffe2d9e7) +(cherry picked from commit 6e4345baac776a1b715a4173539171d4ecdd07af) +Signed-off-by: Antonio Cardace +--- + src/initrd/nmi-cmdline-reader.c | 40 ++++- + src/initrd/tests/test-cmdline-reader.c | 196 ++++++++++++++++++++++++- + 2 files changed, 231 insertions(+), 5 deletions(-) + +diff --git a/src/initrd/nmi-cmdline-reader.c b/src/initrd/nmi-cmdline-reader.c +index 1b693758f..f94cc7db8 100644 +--- a/src/initrd/nmi-cmdline-reader.c ++++ b/src/initrd/nmi-cmdline-reader.c +@@ -21,6 +21,8 @@ + typedef struct { + GHashTable *hash; + GPtrArray *array; ++ GPtrArray *vlan_parents; ++ GHashTable *explicit_ip_connections; + NMConnection *bootdev_connection; /* connection for bootdev=$ifname */ + NMConnection *default_connection; /* connection not bound to any ifname */ + char *hostname; +@@ -38,7 +40,9 @@ reader_new (void) + + reader = g_slice_new (Reader); + *reader = (Reader) { +- .hash = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_object_unref), ++ .hash = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, g_object_unref), ++ .explicit_ip_connections = g_hash_table_new_full (nm_direct_hash, NULL, g_object_unref, NULL), ++ .vlan_parents = g_ptr_array_new_with_free_func (g_free), + .array = g_ptr_array_new (), + }; + +@@ -51,6 +55,8 @@ reader_destroy (Reader *reader, gboolean free_hash) + gs_unref_hashtable GHashTable *hash = NULL; + + g_ptr_array_unref (reader->array); ++ g_ptr_array_unref (reader->vlan_parents); ++ g_hash_table_unref (reader->explicit_ip_connections); + hash = g_steal_pointer (&reader->hash); + nm_clear_g_free (&reader->hostname); + nm_clear_g_free (&reader->dhcp4_vci); +@@ -436,6 +442,8 @@ reader_parse_ip (Reader *reader, const char *sysfs_dir, char *argument) + else + connection = reader_get_default_connection (reader); + ++ g_hash_table_add (reader->explicit_ip_connections, g_object_ref (connection)); ++ + s_ip4 = nm_connection_get_setting_ip4_config (connection); + s_ip6 = nm_connection_get_setting_ip6_config (connection); + +@@ -789,6 +797,9 @@ reader_parse_vlan (Reader *reader, char *argument) + + if (argument && *argument) + _LOGW (LOGD_CORE, "Ignoring extra: '%s'.", argument); ++ ++ if (!nm_strv_ptrarray_contains (reader->vlan_parents, phy)) ++ g_ptr_array_add (reader->vlan_parents, g_strdup (phy)); + } + + static void +@@ -1031,6 +1042,33 @@ nmi_cmdline_reader_parse (const char *sysfs_dir, const char *const*argv, char ** + } + } + ++ for (i = 0; i < reader->vlan_parents->len; i++) { ++ NMConnection *connection; ++ NMSettingIPConfig *s_ip; ++ ++ /* Disable IP configuration for parent connections of VLANs, ++ * unless those interfaces were explicitly configured otherwise. */ ++ ++ connection = reader_get_connection (reader, reader->vlan_parents->pdata[i], NULL, TRUE); ++ if (!g_hash_table_contains (reader->explicit_ip_connections, connection)) { ++ s_ip = nm_connection_get_setting_ip4_config (connection); ++ if (s_ip) { ++ g_object_set (s_ip, ++ NM_SETTING_IP_CONFIG_METHOD, ++ NM_SETTING_IP4_CONFIG_METHOD_DISABLED, ++ NULL); ++ } ++ ++ s_ip = nm_connection_get_setting_ip6_config (connection); ++ if (s_ip) { ++ g_object_set (s_ip, ++ NM_SETTING_IP_CONFIG_METHOD, ++ NM_SETTING_IP6_CONFIG_METHOD_DISABLED, ++ NULL); ++ } ++ } ++ } ++ + if (ignore_bootif) + nm_clear_g_free (&bootif_val); + if (bootif_val) { +diff --git a/src/initrd/tests/test-cmdline-reader.c b/src/initrd/tests/test-cmdline-reader.c +index 53ddccc27..b9d2acf41 100644 +--- a/src/initrd/tests/test-cmdline-reader.c ++++ b/src/initrd/tests/test-cmdline-reader.c +@@ -439,7 +439,7 @@ test_bootdev (void) + + connections = nmi_cmdline_reader_parse (TEST_INITRD_DIR "/sysfs", ARGV, &hostname); + g_assert (connections); +- g_assert_cmpint (g_hash_table_size (connections), ==, 2); ++ g_assert_cmpint (g_hash_table_size (connections), ==, 3); + g_assert_cmpstr (hostname, ==, NULL); + + connection = g_hash_table_lookup (connections, "ens3"); +@@ -462,6 +462,18 @@ test_bootdev (void) + g_assert_cmpstr (nm_setting_connection_get_connection_type (s_con), ==, NM_SETTING_VLAN_SETTING_NAME); + g_assert_cmpstr (nm_setting_connection_get_id (s_con), ==, "vlan2"); + g_assert_cmpstr (nm_setting_connection_get_interface_name (s_con), ==, "vlan2"); ++ ++ connection = g_hash_table_lookup (connections, "ens5"); ++ g_assert (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_connection_type (s_con), ++ ==, ++ NM_SETTING_WIRED_SETTING_NAME); ++ g_assert_cmpstr (nm_setting_connection_get_id (s_con), ==, "ens5"); ++ g_assert_cmpstr (nm_setting_connection_get_interface_name (s_con), ==, "ens5"); + } + + static void +@@ -1082,9 +1094,80 @@ test_vlan (void) + + connections = nmi_cmdline_reader_parse (TEST_INITRD_DIR "/sysfs", ARGV[i], &hostname); + g_assert (connections); +- g_assert_cmpint (g_hash_table_size (connections), ==, 1); ++ g_assert_cmpint (g_hash_table_size (connections), ==, 2); + g_assert_cmpstr (hostname, ==, NULL); + ++ /* VLAN eth0.100 */ ++ connection = g_hash_table_lookup (connections, "eth0.100"); ++ g_assert (connection); ++ nmtst_assert_connection_verifies_without_normalization (connection); ++ g_assert_cmpstr (nm_connection_get_connection_type(connection), ++ ==, ++ NM_SETTING_VLAN_SETTING_NAME); ++ g_assert_cmpstr (nm_connection_get_id (connection), ==, "eth0.100"); ++ ++ s_vlan = nm_connection_get_setting_vlan (connection); ++ g_assert (s_vlan); ++ g_assert_cmpstr (nm_setting_vlan_get_parent (s_vlan), ==, "eth0"); ++ g_assert_cmpint (nm_setting_vlan_get_id (s_vlan), ==, 100); ++ ++ s_ip4 = nm_connection_get_setting_ip4_config (connection); ++ g_assert (s_ip4); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip4), ++ ==, ++ NM_SETTING_IP4_CONFIG_METHOD_AUTO); ++ ++ s_ip6 = nm_connection_get_setting_ip6_config (connection); ++ g_assert (s_ip6); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), ++ ==, ++ NM_SETTING_IP6_CONFIG_METHOD_AUTO); ++ ++ /* Ethernet eth0 */ ++ connection = g_hash_table_lookup (connections, "eth0"); ++ g_assert (connection); ++ nmtst_assert_connection_verifies_without_normalization (connection); ++ g_assert_cmpstr (nm_connection_get_connection_type (connection), ++ ==, ++ NM_SETTING_WIRED_SETTING_NAME); ++ g_assert_cmpstr (nm_connection_get_id (connection), ==, "eth0"); ++ ++ s_ip4 = nm_connection_get_setting_ip4_config (connection); ++ g_assert (s_ip4); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip4), ++ ==, ++ NM_SETTING_IP4_CONFIG_METHOD_DISABLED); ++ ++ s_ip6 = nm_connection_get_setting_ip6_config (connection); ++ g_assert (s_ip6); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), ++ ==, ++ NM_SETTING_IP6_CONFIG_METHOD_DISABLED); ++ } ++} ++ ++static void ++test_vlan_with_dhcp_on_parent (void) ++{ ++ const char *const *ARGV0 = NM_MAKE_STRV ("vlan=eth0.100:eth0", "ip=eth0:dhcp"); ++ const char *const *ARGV1 = NM_MAKE_STRV ("ip=eth0:dhcp", "vlan=eth0.100:eth0"); ++ const char *const *ARGV[] = {ARGV0, ARGV1}; ++ guint i; ++ ++ for (i = 0; i < G_N_ELEMENTS (ARGV); i++) { ++ gs_unref_hashtable GHashTable *connections = NULL; ++ NMConnection *connection; ++ NMSettingIPConfig *s_ip4; ++ NMSettingIPConfig *s_ip6; ++ NMSettingVlan *s_vlan; ++ gs_free char *hostname = NULL; ++ ++ connections = nmi_cmdline_reader_parse (TEST_INITRD_DIR "/sysfs", ARGV[i], &hostname); ++ g_assert (connections); ++ g_assert_cmpint (g_hash_table_size (connections), ==, 2); ++ g_assert_cmpstr (hostname, ==, NULL); ++ ++ /* VLAN eth0.100 */ + connection = g_hash_table_lookup (connections, "eth0.100"); + g_assert (connection); + nmtst_assert_connection_verifies_without_normalization (connection); +@@ -1093,16 +1176,37 @@ test_vlan (void) + NM_SETTING_VLAN_SETTING_NAME); + g_assert_cmpstr (nm_connection_get_id (connection), ==, "eth0.100"); + ++ s_ip4 = nm_connection_get_setting_ip4_config (connection); ++ g_assert (s_ip4); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip4), ++ ==, ++ NM_SETTING_IP4_CONFIG_METHOD_AUTO); ++ ++ s_ip6 = nm_connection_get_setting_ip6_config (connection); ++ g_assert (s_ip6); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), ++ ==, ++ NM_SETTING_IP6_CONFIG_METHOD_AUTO); ++ + s_vlan = nm_connection_get_setting_vlan (connection); + g_assert (s_vlan); + g_assert_cmpstr (nm_setting_vlan_get_parent (s_vlan), ==, "eth0"); + g_assert_cmpint (nm_setting_vlan_get_id (s_vlan), ==, 100); + ++ /* Ethernet eth0 */ ++ connection = g_hash_table_lookup (connections, "eth0"); ++ g_assert (connection); ++ nmtst_assert_connection_verifies_without_normalization (connection); ++ g_assert_cmpstr (nm_connection_get_connection_type (connection), ++ ==, ++ NM_SETTING_WIRED_SETTING_NAME); ++ g_assert_cmpstr (nm_connection_get_id (connection), ==, "eth0"); ++ + s_ip4 = nm_connection_get_setting_ip4_config (connection); + g_assert (s_ip4); + g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip4), +- ==, +- NM_SETTING_IP4_CONFIG_METHOD_AUTO); ++ ==, ++ NM_SETTING_IP4_CONFIG_METHOD_AUTO); + + s_ip6 = nm_connection_get_setting_ip6_config (connection); + g_assert (s_ip6); +@@ -1112,6 +1216,88 @@ test_vlan (void) + } + } + ++static void ++test_vlan_over_bond (void) ++{ ++ const char *const *ARGV0 = NM_MAKE_STRV ("ip=1.2.3.4:::24::vlan1:none", ++ "bond=bond2:ens3,ens4:mode=active-backup", ++ "vlan=vlan1:bond2"); ++ const char *const *ARGV1 = NM_MAKE_STRV ("vlan=vlan1:bond2", ++ "ip=1.2.3.4:::24::vlan1:none", ++ "bond=bond2:ens3,ens4:mode=active-backup"); ++ const char *const *ARGV2 = NM_MAKE_STRV ("bond=bond2:ens3,ens4:mode=active-backup", ++ "ip=1.2.3.4:::24::vlan1:none", ++ "vlan=vlan1:bond2"); ++ const char *const *ARGV[] = {ARGV0, ARGV1, ARGV2}; ++ guint i; ++ ++ for (i = 0; i < G_N_ELEMENTS (ARGV); i++) { ++ gs_unref_hashtable GHashTable *connections = NULL; ++ NMConnection *connection; ++ NMSettingIPConfig *s_ip4; ++ NMSettingIPConfig *s_ip6; ++ NMSettingVlan *s_vlan; ++ gs_free char *hostname = NULL; ++ ++ connections = nmi_cmdline_reader_parse (TEST_INITRD_DIR "/sysfs", ARGV[i], &hostname); ++ g_assert (connections); ++ g_assert_cmpint (g_hash_table_size (connections), ==, 4); ++ g_assert_cmpstr (hostname, ==, NULL); ++ ++ /* VLAN vlan1 */ ++ connection = g_hash_table_lookup (connections, "vlan1"); ++ g_assert (connection); ++ nmtst_assert_connection_verifies_without_normalization (connection); ++ g_assert_cmpstr (nm_connection_get_connection_type (connection), ++ ==, ++ NM_SETTING_VLAN_SETTING_NAME); ++ g_assert_cmpstr (nm_connection_get_id (connection), ==, "vlan1"); ++ ++ s_ip4 = nm_connection_get_setting_ip4_config(connection); ++ g_assert (s_ip4); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip4), ++ ==, ++ NM_SETTING_IP4_CONFIG_METHOD_MANUAL); ++ ++ s_ip6 = nm_connection_get_setting_ip6_config (connection); ++ g_assert (s_ip6); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), ++ ==, ++ NM_SETTING_IP6_CONFIG_METHOD_DISABLED); ++ s_vlan = nm_connection_get_setting_vlan (connection); ++ g_assert (s_vlan); ++ g_assert_cmpstr(nm_setting_vlan_get_parent (s_vlan), ==, "bond2"); ++ g_assert_cmpint(nm_setting_vlan_get_id (s_vlan), ==, 1); ++ ++ /* Bond bond2 */ ++ connection = g_hash_table_lookup (connections, "bond2"); ++ g_assert (connection); ++ nmtst_assert_connection_verifies_without_normalization (connection); ++ g_assert_cmpstr (nm_connection_get_connection_type (connection), ++ ==, ++ NM_SETTING_BOND_SETTING_NAME); ++ g_assert_cmpstr(nm_connection_get_id (connection), ==, "bond2"); ++ ++ s_ip4 = nm_connection_get_setting_ip4_config (connection); ++ g_assert (s_ip4); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip4), ++ ==, ++ NM_SETTING_IP4_CONFIG_METHOD_DISABLED); ++ ++ s_ip6 = nm_connection_get_setting_ip6_config (connection); ++ g_assert (s_ip6); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), ++ ==, ++ NM_SETTING_IP6_CONFIG_METHOD_DISABLED); ++ ++ /* Ethernet ens3 and ens4 */ ++ connection = g_hash_table_lookup (connections, "ens3"); ++ g_assert (connection); ++ connection = g_hash_table_lookup (connections, "ens4"); ++ g_assert (connection); ++ } ++} ++ + static void + test_ibft_ip_dev (void) + { +@@ -1724,6 +1910,8 @@ int main (int argc, char **argv) + g_test_add_func ("/initrd/cmdline/bond/default", test_bond_default); + g_test_add_func ("/initrd/cmdline/team", test_team); + g_test_add_func ("/initrd/cmdline/vlan", test_vlan); ++ g_test_add_func ("/initrd/cmdline/vlan/dhcp-on-parent", test_vlan_with_dhcp_on_parent); ++ g_test_add_func ("/initrd/cmdline/vlan/over-bond", test_vlan_over_bond); + g_test_add_func ("/initrd/cmdline/bridge", test_bridge); + g_test_add_func ("/initrd/cmdline/bridge/default", test_bridge_default); + g_test_add_func ("/initrd/cmdline/bridge/ip", test_bridge_ip); +-- +2.28.0 + diff --git a/SOURCES/1022-initrd-fix-parsing-with-empty-token-rh1902791.patch b/SOURCES/1022-initrd-fix-parsing-with-empty-token-rh1902791.patch new file mode 100644 index 0000000..4f426e3 --- /dev/null +++ b/SOURCES/1022-initrd-fix-parsing-with-empty-token-rh1902791.patch @@ -0,0 +1,232 @@ +From aaf22cfa2ac38f786faab16d027c29616c9f9385 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Wed, 25 Nov 2020 17:39:48 +0100 +Subject: [PATCH 1/1] initrd: fix parsing of ip= arguments with empty first + token + +The parser checks if the first token of an ip= argument is an IP +address to determine which of the two possible syntaxes is used: + + ip=:{dhcp|on|any|dhcp6|auto6}[:[][:]] + ip=:[]:::::{none|off|dhcp|on|any|dhcp6|auto6|ibft}[:[][:]] + +This works as long as the first token is not empty, which - according +to the dracut.cmdline man page - seems to be guaranteed. + +However, the network-legacy dracut plugin accepts an empty interface +or client IP. Also, if a user needs DHCP and wants to specify a +hostname, the only possible syntax is: + + ip=::::::dhcp + +Change the parser to check the second token instead, similarly to what +the network-legacy module does [1]. + +[1] https://github.com/dracutdevs/dracut/blob/050/modules.d/40network/net-lib.sh#L490 + +https://bugzilla.redhat.com/show_bug.cgi?id=1900260 +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/693 +(cherry picked from commit b0c018830e7884e7457b8ea44553946ff680eb89) +(cherry picked from commit 435d662669cf487abe91c31b94ac71239073ce98) +(cherry picked from commit d67d0a34950fb44d66aea9e45c1d09b82fcaa18b) +Signed-off-by: Antonio Cardace +--- + src/initrd/nmi-cmdline-reader.c | 37 ++++++--- + src/initrd/tests/test-cmdline-reader.c | 100 ++++++++++++++++++++++++- + 2 files changed, 126 insertions(+), 11 deletions(-) + +diff --git a/src/initrd/nmi-cmdline-reader.c b/src/initrd/nmi-cmdline-reader.c +index f94cc7db8..17e0ce5d4 100644 +--- a/src/initrd/nmi-cmdline-reader.c ++++ b/src/initrd/nmi-cmdline-reader.c +@@ -367,6 +367,7 @@ reader_parse_ip (Reader *reader, const char *sysfs_dir, char *argument) + NMSettingIPConfig *s_ip4 = NULL, *s_ip6 = NULL; + gs_unref_hashtable GHashTable *ibft = NULL; + const char *tmp; ++ const char *tmp2; + const char *kind = NULL; + const char *client_ip = NULL; + const char *peer = NULL; +@@ -391,17 +392,37 @@ reader_parse_ip (Reader *reader, const char *sysfs_dir, char *argument) + /* ip={dhcp|on|any|dhcp6|auto6|ibft} */ + kind = tmp; + } else { +- client_ip_family = get_ip_address_family (tmp, TRUE); +- if (client_ip_family != AF_UNSPEC) { +- /* :[]:::: */ ++ tmp2 = get_word (&argument, ':'); ++ if (NM_IN_STRSET (tmp2, ++ "none", ++ "off", ++ "dhcp", ++ "on" ++ "any", ++ "dhcp6", ++ "auto", ++ "auto6", ++ "ibft")) { ++ /* :{none|off|dhcp|on|any|dhcp6|auto|auto6|ibft} */ ++ iface_spec = tmp; ++ kind = tmp2; ++ } else { ++ /* :[]:::: */ + client_ip = tmp; +- peer = get_word (&argument, ':'); ++ if (client_ip) { ++ client_ip_family = get_ip_address_family (client_ip, TRUE); ++ if (client_ip_family == AF_UNSPEC) { ++ _LOGW (LOGD_CORE, "Invalid IP address '%s'.", client_ip); ++ return; ++ } ++ } ++ ++ peer = tmp2; + gateway_ip = get_word (&argument, ':'); + netmask = get_word (&argument, ':'); + client_hostname = get_word (&argument, ':'); + iface_spec = get_word (&argument, ':'); +- } else { +- iface_spec = tmp; ++ kind = get_word (&argument, ':'); + } + + if (client_hostname && !nm_sd_hostname_is_valid (client_hostname, FALSE)) +@@ -412,10 +433,6 @@ reader_parse_ip (Reader *reader, const char *sysfs_dir, char *argument) + reader->hostname = g_strdup (client_hostname); + } + +- /* :{none|off|dhcp|on|any|dhcp6|auto6|ibft} */ +- +- kind = get_word (&argument, ':'); +- + tmp = get_word (&argument, ':'); + dns_addr_family[0] = get_ip_address_family (tmp, FALSE); + if (dns_addr_family[0] != AF_UNSPEC) { +diff --git a/src/initrd/tests/test-cmdline-reader.c b/src/initrd/tests/test-cmdline-reader.c +index b9d2acf41..f5c1a1422 100644 +--- a/src/initrd/tests/test-cmdline-reader.c ++++ b/src/initrd/tests/test-cmdline-reader.c +@@ -75,6 +75,103 @@ test_auto (void) + g_assert (!nm_setting_ip_config_get_gateway (s_ip6)); + } + ++static void ++test_dhcp_with_hostname (void) ++{ ++ gs_unref_hashtable GHashTable *connections = NULL; ++ const char *const *ARGV = NM_MAKE_STRV ("ip=::::host1::dhcp"); ++ NMConnection *connection; ++ NMSettingConnection *s_con; ++ NMSettingWired *s_wired; ++ NMSettingIPConfig *s_ip4; ++ NMSettingIPConfig *s_ip6; ++ gs_free char *hostname = NULL; ++ ++ connections = nmi_cmdline_reader_parse (TEST_INITRD_DIR "/sysfs", ARGV, &hostname); ++ g_assert (connections); ++ g_assert_cmpint (g_hash_table_size (connections), ==, 1); ++ g_assert_cmpstr (hostname, ==, "host1"); ++ ++ connection = g_hash_table_lookup (connections, "default_connection"); ++ g_assert (connection); ++ nmtst_assert_connection_verifies_without_normalization (connection); ++ ++ g_assert (!nm_connection_get_setting_vlan (connection)); ++ ++ s_con = nm_connection_get_setting_connection (connection); ++ g_assert (s_con); ++ g_assert_cmpstr (nm_setting_connection_get_connection_type (s_con), ==, NM_SETTING_WIRED_SETTING_NAME); ++ g_assert_cmpstr (nm_setting_connection_get_id (s_con), ==, "Wired Connection"); ++ g_assert_cmpint (nm_setting_connection_get_timestamp (s_con), ==, 0); ++ g_assert_cmpint (nm_setting_connection_get_multi_connect (s_con), ==, NM_CONNECTION_MULTI_CONNECT_MULTIPLE); ++ g_assert_cmpint (nm_setting_connection_get_wait_device_timeout (s_con), ==, -1); ++ ++ g_assert (nm_setting_connection_get_autoconnect (s_con)); ++ ++ s_wired = nm_connection_get_setting_wired (connection); ++ g_assert (s_wired); ++ g_assert (!nm_setting_wired_get_mac_address (s_wired)); ++ g_assert_cmpint (nm_setting_wired_get_mtu (s_wired), ==, 0); ++ ++ s_ip4 = nm_connection_get_setting_ip4_config (connection); ++ g_assert (s_ip4); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip4), ==, NM_SETTING_IP4_CONFIG_METHOD_AUTO); ++ ++ s_ip6 = nm_connection_get_setting_ip6_config (connection); ++ g_assert (s_ip6); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), ==, NM_SETTING_IP6_CONFIG_METHOD_AUTO); ++} ++ ++static void ++test_dhcp_with_mtu (void) ++{ ++ const char *const *ARGV0 = NM_MAKE_STRV ("ip=:dhcp:1499"); ++ const char *const *ARGV1 = NM_MAKE_STRV ("ip=::::::dhcp:1499"); ++ const char *const *ARGV[] = {ARGV0, ARGV1}; ++ guint i; ++ ++ for (i = 0; i < G_N_ELEMENTS (ARGV); i++) { ++ gs_unref_hashtable GHashTable *connections = NULL; ++ NMConnection *connection; ++ NMSettingConnection *s_con; ++ NMSettingWired *s_wired; ++ NMSettingIPConfig *s_ip4; ++ NMSettingIPConfig *s_ip6; ++ gs_free char *hostname = NULL; ++ ++ connections = nmi_cmdline_reader_parse (TEST_INITRD_DIR "/sysfs", ARGV[i], &hostname); ++ g_assert (connections); ++ g_assert_cmpint (g_hash_table_size (connections), ==, 1); ++ g_assert_cmpstr (hostname, ==, NULL); ++ ++ connection = g_hash_table_lookup (connections, "default_connection"); ++ g_assert (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_connection_type (s_con), ==, NM_SETTING_WIRED_SETTING_NAME); ++ g_assert_cmpstr (nm_setting_connection_get_id (s_con), ==, "Wired Connection"); ++ g_assert_cmpint (nm_setting_connection_get_timestamp (s_con), ==, 0); ++ g_assert_cmpint (nm_setting_connection_get_multi_connect (s_con), ==, NM_CONNECTION_MULTI_CONNECT_MULTIPLE); ++ g_assert_cmpint (nm_setting_connection_get_wait_device_timeout (s_con), ==, -1); ++ ++ g_assert (nm_setting_connection_get_autoconnect (s_con)); ++ ++ s_wired = nm_connection_get_setting_wired (connection); ++ g_assert (s_wired); ++ g_assert (!nm_setting_wired_get_mac_address (s_wired)); ++ g_assert_cmpint (nm_setting_wired_get_mtu (s_wired), ==, 1499); ++ ++ s_ip4 = nm_connection_get_setting_ip4_config (connection); ++ g_assert (s_ip4); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip4), ==, NM_SETTING_IP4_CONFIG_METHOD_AUTO); ++ s_ip6 = nm_connection_get_setting_ip6_config (connection); ++ g_assert (s_ip6); ++ g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), ==, NM_SETTING_IP6_CONFIG_METHOD_AUTO); ++ } ++} ++ + static void + test_if_auto_with_mtu (void) + { +@@ -111,7 +208,6 @@ test_if_auto_with_mtu (void) + g_assert (!nm_setting_ip_config_get_ignore_auto_dns (s_ip6)); + } + +- + static void + test_if_dhcp6 (void) + { +@@ -1894,6 +1990,8 @@ int main (int argc, char **argv) + nmtst_init_assert_logging (&argc, &argv, "INFO", "DEFAULT"); + + g_test_add_func ("/initrd/cmdline/auto", test_auto); ++ g_test_add_func ("/initrd/cmdline/dhcp_with_hostname", test_dhcp_with_hostname); ++ g_test_add_func ("/initrd/cmdline/dhcp_with_mtu", test_dhcp_with_mtu); + g_test_add_func ("/initrd/cmdline/if_auto_with_mtu", test_if_auto_with_mtu); + g_test_add_func ("/initrd/cmdline/if_dhcp6", test_if_dhcp6); + g_test_add_func ("/initrd/cmdline/if_auto_with_mtu_and_mac", test_if_auto_with_mtu_and_mac); +-- +2.28.0 + diff --git a/SOURCES/1023-initrd-fix-failing-unit-test-rh1903698.patch b/SOURCES/1023-initrd-fix-failing-unit-test-rh1903698.patch new file mode 100644 index 0000000..fbdc6c5 --- /dev/null +++ b/SOURCES/1023-initrd-fix-failing-unit-test-rh1903698.patch @@ -0,0 +1,30 @@ +From a3564a34043550b1cd176b87cdaa47c739f38341 Mon Sep 17 00:00:00 2001 +From: Antonio Cardace +Date: Fri, 4 Dec 2020 12:55:32 +0100 +Subject: [PATCH] initrd: fix failing unit test + +In RHEL 8.3 commit fc7c83cbdd has not been backported as it's a +breaking change thus this test needs adjusting as it assumed the new +behaviour. + +Signed-off-by: Antonio Cardace +--- + src/initrd/tests/test-cmdline-reader.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/initrd/tests/test-cmdline-reader.c b/src/initrd/tests/test-cmdline-reader.c +index f5c1a1422..c4c5c7483 100644 +--- a/src/initrd/tests/test-cmdline-reader.c ++++ b/src/initrd/tests/test-cmdline-reader.c +@@ -1359,7 +1359,7 @@ test_vlan_over_bond (void) + g_assert (s_ip6); + g_assert_cmpstr (nm_setting_ip_config_get_method (s_ip6), + ==, +- NM_SETTING_IP6_CONFIG_METHOD_DISABLED); ++ NM_SETTING_IP6_CONFIG_METHOD_AUTO); + s_vlan = nm_connection_get_setting_vlan (connection); + g_assert (s_vlan); + g_assert_cmpstr(nm_setting_vlan_get_parent (s_vlan), ==, "bond2"); +-- +2.28.0 + diff --git a/SPECS/NetworkManager.spec b/SPECS/NetworkManager.spec index 85d6a42..4ceae0c 100644 --- a/SPECS/NetworkManager.spec +++ b/SPECS/NetworkManager.spec @@ -7,7 +7,7 @@ %global epoch_version 1 %global rpm_version 1.26.0 %global real_version 1.26.0 -%global release_version 9 +%global release_version 12 %global snapshot %{nil} %global git_sha %{nil} @@ -169,6 +169,10 @@ Patch1016: 1016-dhcp-implement-dhcp-vendor-class-identifier-option-rh1871042.pat Patch1017: 1017-initrd-parse-rd.net.dhcp.vendor-class-rh1870692.patch Patch1018: 1018-initrd-accept-mac-ifaces-rh1879795.patch Patch1019: 1019-initrd-generate-infiniband-connections-rh1883173.patch +Patch1020: 1020-fix-unauth-user-can-make-nm-crash-rh1890887.patch +Patch1021: 1021-initrd-vlan-fixes-rh1903695-rh1903698.patch +Patch1022: 1022-initrd-fix-parsing-with-empty-token-rh1902791.patch +Patch1023: 1023-initrd-fix-failing-unit-test-rh1903698.patch # The pregenerated docs contain default values and paths that depend # on the configure options when creating the source tarball. @@ -1116,6 +1120,17 @@ fi %changelog +* Wed Dec 4 2020 Antonio Cardace - 1:1.26.0-12 +- initrd: fix failing unit test 'test_vlan_over_bond' (rh #1903698) + +* Wed Dec 2 2020 Antonio Cardace - 1:1.26.0-11 +- initrd: disable ipv4 and ipv6 by default for vlan parent connection (rh #1903698) +- initrd: fix parsing of ip= argument with dotted interface name (rh #1903695) +- initrd: fix parsing with empty token (rh #1902791) + +* Tue Oct 28 2020 Antonio Cardace - 1:1.26.0-10 +- nm-manager: fix crash that can be caused by an anauthorized user (rh #1890887) + * Tue Oct 20 2020 Beniamino Galvani - 1:1.26.0-9 - initrd: generate infiniband connections (rh #1890262)