diff --git a/SOURCES/1001-wwan-dns-fix-rh2059138.patch b/SOURCES/1001-wwan-dns-fix-rh2059138.patch new file mode 100644 index 0000000..fbfcf88 --- /dev/null +++ b/SOURCES/1001-wwan-dns-fix-rh2059138.patch @@ -0,0 +1,62 @@ +From 7ba52fdcfeeb1e5400bcecb9fa93b3099dcccb47 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Fri, 25 Feb 2022 10:06:48 +0100 +Subject: [PATCH] core: initialize l3cd dns-priority for ppp and wwan + +For devices that configure IP by themselves (by returning +"->ready_for_ip_config() = TRUE" and implementing +->act_stage3_ip_config()), we skip manual configuration. Currently, +manual configuration is the only one that sets flag HAS_DNS_PRIORITY +into the resulting l3cd. + +So, the merged l3cd for such devices misses a dns-priority and is +ignored by the DNS manager. + +Explicitly initialize the priority to 0; in this way, the default +value for the device will be set in the final l3cd during the merge. + +Fixes: 58287cbcc0c8 ('core: rework IP configuration in NetworkManager using layer 3 configuration') + +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/931 +(cherry picked from commit b2e559fab2fa5adbf4e159fc1c2cadd3d965b01b) +(cherry picked from commit bfd3216584e9fe1eb0b6f3f81e3eb75a40877775) +--- + src/core/devices/wwan/nm-modem-broadband.c | 2 ++ + src/core/ppp/nm-ppp-manager.c | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/src/core/devices/wwan/nm-modem-broadband.c b/src/core/devices/wwan/nm-modem-broadband.c +index f5336d3750..b585652e5d 100644 +--- a/src/core/devices/wwan/nm-modem-broadband.c ++++ b/src/core/devices/wwan/nm-modem-broadband.c +@@ -1032,6 +1032,7 @@ stage3_ip_config_start(NMModem *modem, int addr_family, NMModemIPMethod ip_metho + l3cd = nm_l3_config_data_new(nm_platform_get_multi_idx(NM_PLATFORM_GET), + ifindex, + NM_IP_CONFIG_SOURCE_WWAN); ++ nm_l3_config_data_set_dns_priority(l3cd, AF_INET, 0); + + address = (NMPlatformIP4Address){ + .address = address_network, +@@ -1118,6 +1119,7 @@ stage3_ip_config_start(NMModem *modem, int addr_family, NMModemIPMethod ip_metho + l3cd = nm_l3_config_data_new(nm_platform_get_multi_idx(NM_PLATFORM_GET), + ifindex, + NM_IP_CONFIG_SOURCE_WWAN); ++ nm_l3_config_data_set_dns_priority(l3cd, AF_INET6, 0); + + do_auto = TRUE; + +diff --git a/src/core/ppp/nm-ppp-manager.c b/src/core/ppp/nm-ppp-manager.c +index dd6b1bc7f0..5761d59d39 100644 +--- a/src/core/ppp/nm-ppp-manager.c ++++ b/src/core/ppp/nm-ppp-manager.c +@@ -545,6 +545,7 @@ impl_ppp_manager_set_ip4_config(NMDBusObject *obj, + NM_IP_CONFIG_SOURCE_PPP); + + nm_l3_config_data_set_mtu(l3cd, mtu); ++ nm_l3_config_data_set_dns_priority(l3cd, AF_INET, 0); + + address = (NMPlatformIP4Address){ + .plen = 32, +-- +2.34.1 + diff --git a/SPECS/NetworkManager.spec b/SPECS/NetworkManager.spec index 289daa0..2fab53b 100644 --- a/SPECS/NetworkManager.spec +++ b/SPECS/NetworkManager.spec @@ -7,7 +7,7 @@ %global epoch_version 1 %global rpm_version 1.36.0 %global real_version 1.36.0 -%global release_version 1 +%global release_version 2 %global snapshot %{nil} %global git_sha %{nil} @@ -194,7 +194,7 @@ Patch1: 0001-cloud-setup-systemd-unit-rh1791758.patch Patch2: 0002-firewall-Default-to-iptables-backend-to-preserve-behavior.patch # Bugfixes that are only relevant until next rebase of the package. -# Patch1001: 1001-some.patch +Patch1001: 1001-wwan-dns-fix-rh2059138.patch # The pregenerated docs contain default values and paths that depend # on the configure options when creating the source tarball. @@ -1196,6 +1196,9 @@ fi %changelog +* Mon Feb 28 2022 Beniamino Galvani - 1:1.36.0-2 +- core: fix setting DNS from WWAN and PPP (rh #2059138) + * Thu Feb 24 2022 Lubomir Rintel - 1:1.36.0-1 - Upgrade to 1.36.0 release - core: avoid losing L3 configuration the second time it's applied (rh #2043514)