diff options
| author | Michael Biebl <biebl@debian.org> | 2022-02-26 10:55:56 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2022-02-26 10:55:56 +0100 |
| commit | a98f489f2f51aa8fb22f9d3343215722ede4abfd (patch) | |
| tree | cb5268cb36bce16fa63e724011f26314591244cd | |
| parent | 1b1ea5e7932eb8b9491beb22f69844697751f1ce (diff) | |
core: initialize l3cd dns-priority for ppp and wwan
Patch taken from https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1122 Closes: #1006396
| -rw-r--r-- | debian/patches/core-initialize-l3cd-dns-priority-for-ppp-and-wwan.patch | 56 | ||||
| -rw-r--r-- | debian/patches/series | 1 |
2 files changed, 57 insertions, 0 deletions
diff --git a/debian/patches/core-initialize-l3cd-dns-priority-for-ppp-and-wwan.patch b/debian/patches/core-initialize-l3cd-dns-priority-for-ppp-and-wwan.patch new file mode 100644 index 00000000..8c00058e --- /dev/null +++ b/debian/patches/core-initialize-l3cd-dns-priority-for-ppp-and-wwan.patch @@ -0,0 +1,56 @@ +From: Beniamino Galvani <bgalvani@redhat.com> +Date: Fri, 25 Feb 2022 10:06:48 +0100 +Subject: 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 +--- + 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 f5336d3..b585652 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 dd6b1bc..5761d59 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, diff --git a/debian/patches/series b/debian/patches/series index a2d7e06d..54db2a10 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ Force-online-state-with-unmanaged-devices.patch +core-initialize-l3cd-dns-priority-for-ppp-and-wwan.patch |