From a98f489f2f51aa8fb22f9d3343215722ede4abfd Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sat, 26 Feb 2022 10:55:56 +0100 Subject: core: initialize l3cd dns-priority for ppp and wwan Patch taken from https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1122 Closes: #1006396 --- ...ialize-l3cd-dns-priority-for-ppp-and-wwan.patch | 56 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 57 insertions(+) create mode 100644 debian/patches/core-initialize-l3cd-dns-priority-for-ppp-and-wwan.patch (limited to 'debian') 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 +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 -- cgit 1.3.0-6-gf8a5 From a31332e76bee4c5977e2ef9daeeddb205bad27ea Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sat, 26 Feb 2022 10:57:47 +0100 Subject: Release version 1.36.0-2 to unstable --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 9c77350a..558e5eb9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +network-manager (1.36.0-2) unstable; urgency=medium + + * core: initialize l3cd dns-priority for ppp and wwan (Closes: #1006396) + + -- Michael Biebl Sat, 26 Feb 2022 10:57:32 +0100 + network-manager (1.36.0-1) unstable; urgency=medium * New upstream version 1.36.0 -- cgit 1.3.0-6-gf8a5 From d4767ed4b43390b8b1622b8dd5b497dcc9de9136 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 8 Mar 2022 09:13:19 +0100 Subject: New upstream version 1.36.2 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 558e5eb9..01012c11 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +network-manager (1.36.2-1) UNRELEASED; urgency=medium + + * New upstream version 1.36.2 + + -- Michael Biebl Tue, 08 Mar 2022 09:13:17 +0100 + network-manager (1.36.0-2) unstable; urgency=medium * core: initialize l3cd dns-priority for ppp and wwan (Closes: #1006396) -- cgit 1.3.0-6-gf8a5 From 21f50d71c2a318959eb9c2e7b4b0ab41b97c3dd8 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 8 Mar 2022 09:15:13 +0100 Subject: Rebase patches --- ...Force-online-state-with-unmanaged-devices.patch | 6 +-- ...ialize-l3cd-dns-priority-for-ppp-and-wwan.patch | 56 ---------------------- debian/patches/series | 1 - 3 files changed, 3 insertions(+), 60 deletions(-) delete mode 100644 debian/patches/core-initialize-l3cd-dns-priority-for-ppp-and-wwan.patch (limited to 'debian') diff --git a/debian/patches/Force-online-state-with-unmanaged-devices.patch b/debian/patches/Force-online-state-with-unmanaged-devices.patch index e009f715..f4ff69b3 100644 --- a/debian/patches/Force-online-state-with-unmanaged-devices.patch +++ b/debian/patches/Force-online-state-with-unmanaged-devices.patch @@ -12,7 +12,7 @@ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512286 1 file changed, 115 insertions(+) diff --git a/src/core/nm-manager.c b/src/core/nm-manager.c -index b440b22..9b1057f 100644 +index 6c73d23..d12357c 100644 --- a/src/core/nm-manager.c +++ b/src/core/nm-manager.c @@ -51,6 +51,8 @@ @@ -146,7 +146,7 @@ index b440b22..9b1057f 100644 return TRUE; } -@@ -7967,6 +8056,22 @@ nm_manager_init(NMManager *self) +@@ -7984,6 +8073,22 @@ nm_manager_init(NMManager *self) _LOGW(LOGD_CORE, "failed to monitor kernel firmware directory '%s'.", KERNEL_FIRMWARE_DIR); } @@ -169,7 +169,7 @@ index b440b22..9b1057f 100644 /* Update timestamps in active connections */ priv->timestamp_update_id = g_timeout_add_seconds(300, -@@ -8252,6 +8357,16 @@ dispose(GObject *object) +@@ -8269,6 +8374,16 @@ dispose(GObject *object) g_clear_object(&priv->fw_monitor); } 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 deleted file mode 100644 index 8c00058e..00000000 --- a/debian/patches/core-initialize-l3cd-dns-priority-for-ppp-and-wwan.patch +++ /dev/null @@ -1,56 +0,0 @@ -From: Beniamino Galvani -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 54db2a10..a2d7e06d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ Force-online-state-with-unmanaged-devices.patch -core-initialize-l3cd-dns-priority-for-ppp-and-wwan.patch -- cgit 1.3.0-6-gf8a5 From f2604e859d9e66eb585d75c53f75f701cd5cc5c0 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 8 Mar 2022 09:50:45 +0100 Subject: Downgrade log message to info if we fail to open /run/network/ifstate --- debian/patches/Force-online-state-with-unmanaged-devices.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/patches/Force-online-state-with-unmanaged-devices.patch b/debian/patches/Force-online-state-with-unmanaged-devices.patch index f4ff69b3..4765891f 100644 --- a/debian/patches/Force-online-state-with-unmanaged-devices.patch +++ b/debian/patches/Force-online-state-with-unmanaged-devices.patch @@ -12,7 +12,7 @@ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512286 1 file changed, 115 insertions(+) diff --git a/src/core/nm-manager.c b/src/core/nm-manager.c -index 6c73d23..d12357c 100644 +index 6c73d23..9a73a16 100644 --- a/src/core/nm-manager.c +++ b/src/core/nm-manager.c @@ -51,6 +51,8 @@ @@ -88,7 +88,7 @@ index 6c73d23..d12357c 100644 + + channel = g_io_channel_new_file(IFUPDOWN_STATE_FILE, "r", NULL); + if (!channel) { -+ nm_log_warn(LOGD_CORE, "Error: failed to open %s", IFUPDOWN_STATE_FILE); ++ nm_log_info(LOGD_CORE, "failed to open %s", IFUPDOWN_STATE_FILE); + return; + } + -- cgit 1.3.0-6-gf8a5 From 0514770b02f34ccb56b6bc52010452663c6717ed Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 8 Mar 2022 09:51:07 +0100 Subject: Release version 1.36.2-1 to unstable --- debian/changelog | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 01012c11..80aec69c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ -network-manager (1.36.2-1) UNRELEASED; urgency=medium +network-manager (1.36.2-1) unstable; urgency=medium * New upstream version 1.36.2 + * Rebase patches + * Downgrade log message to info if we fail to open /run/network/ifstate - -- Michael Biebl Tue, 08 Mar 2022 09:13:17 +0100 + -- Michael Biebl Tue, 08 Mar 2022 09:50:49 +0100 network-manager (1.36.0-2) unstable; urgency=medium -- cgit 1.3.0-6-gf8a5