From 39984923269e8e81b54f6f22401a7789b78e683c Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 5 Oct 2020 22:28:47 +0200 Subject: New upstream version 1.27.90 (1.28 rc1) --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 248c1457..9709313d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +network-manager (1.27.90-1) UNRELEASED; urgency=medium + + * New upstream version 1.27.90 (1.28 rc1) + + -- Michael Biebl Mon, 05 Oct 2020 22:28:28 +0200 + network-manager (1.26.2-1) unstable; urgency=medium * New upstream version 1.26.2 -- cgit 1.3.0-6-gf8a5 From 1e448bcf4943dbc7c258110478882ae122b5d741 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 5 Oct 2020 23:08:31 +0200 Subject: Rebase patches --- ...Force-online-state-with-unmanaged-devices.patch | 258 ++++++++++----------- 1 file changed, 129 insertions(+), 129 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 8c031b1c..13368ecc 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/nm-manager.c b/src/nm-manager.c -index 778e3b9..d0cc527 100644 +index a04ca0e..ddb9094 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -52,6 +52,8 @@ @@ -24,165 +24,165 @@ index 778e3b9..d0cc527 100644 /*****************************************************************************/ typedef struct { -@@ -187,6 +189,10 @@ typedef struct { - GFileMonitor *fw_monitor; - guint fw_changed_id; +@@ -186,6 +188,10 @@ typedef struct { + GFileMonitor *fw_monitor; + guint fw_changed_id; -+ /* ifupdown state file monitor */ -+ GFileMonitor *ifstate_monitor; -+ gboolean ifstate_force_online; ++ /* ifupdown state file monitor */ ++ GFileMonitor *ifstate_monitor; ++ gboolean ifstate_force_online; + - guint timestamp_update_id; + guint timestamp_update_id; - guint devices_inited_id; -@@ -1430,6 +1436,27 @@ find_best_device_state (NMManager *manager) - return best_state; + guint devices_inited_id; +@@ -1433,6 +1439,27 @@ find_best_device_state(NMManager *manager) + return best_state; } +static NMState -+find_unmanaged_state (NMManager *self, NMState current_state) ++find_unmanaged_state(NMManager *self, NMState current_state) +{ -+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); -+ NMState new_state = current_state; -+ NMDevice *device; -+ -+ c_list_for_each_entry (device, &priv->devices_lst_head, devices_lst) { -+ NMDeviceState state = nm_device_get_state (device); -+ -+ if (state == NM_DEVICE_STATE_UNMANAGED) { -+ const char *iface = nm_device_get_ip_iface (device); -+ if (priv->ifstate_force_online) { -+ new_state = NM_STATE_CONNECTED_GLOBAL; -+ nm_log_dbg (LOGD_CORE, "Unmanaged device found: %s; state CONNECTED forced.", iface); -+ } -+ } -+ } -+ return new_state; ++ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE(self); ++ NMState new_state = current_state; ++ NMDevice *device; ++ ++ c_list_for_each_entry(device, &priv->devices_lst_head, devices_lst) { ++ NMDeviceState state = nm_device_get_state(device); ++ ++ if (state == NM_DEVICE_STATE_UNMANAGED) { ++ const char *iface = nm_device_get_ip_iface(device); ++ if (priv->ifstate_force_online) { ++ new_state = NM_STATE_CONNECTED_GLOBAL; ++ nm_log_dbg(LOGD_CORE, "Unmanaged device found: %s; state CONNECTED forced.", iface); ++ } ++ } ++ } ++ return new_state; +} + static void - nm_manager_update_metered (NMManager *self) + nm_manager_update_metered(NMManager *self) { -@@ -1476,6 +1503,9 @@ nm_manager_update_state (NMManager *self) - else - new_state = find_best_device_state (self); +@@ -1479,6 +1506,9 @@ nm_manager_update_state(NMManager *self) + else + new_state = find_best_device_state(self); -+ if (new_state != NM_STATE_CONNECTED_GLOBAL) -+ new_state = find_unmanaged_state (self, new_state); -+ - if ( new_state >= NM_STATE_CONNECTED_LOCAL - && priv->connectivity_state == NM_CONNECTIVITY_FULL) { - new_state = NM_STATE_CONNECTED_GLOBAL; -@@ -6566,6 +6596,62 @@ impl_manager_check_connectivity (NMDBusObject *obj, - nm_auth_chain_add_call (chain, NM_AUTH_PERMISSION_NETWORK_CONTROL, TRUE); ++ if (new_state != NM_STATE_CONNECTED_GLOBAL) ++ new_state = find_unmanaged_state(self, new_state); ++ + if (new_state >= NM_STATE_CONNECTED_LOCAL && priv->connectivity_state == NM_CONNECTIVITY_FULL) { + new_state = NM_STATE_CONNECTED_GLOBAL; + } +@@ -6581,6 +6611,62 @@ impl_manager_set_logging(NMDBusObject * obj, + g_dbus_method_invocation_return_value(invocation, NULL); } +static void -+check_ifstate_file (gpointer user_data) ++check_ifstate_file(gpointer user_data) +{ -+ NMManager *self = NM_MANAGER (user_data); -+ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); -+ GIOChannel *channel; -+ gchar *line; -+ gboolean online = FALSE; -+ -+ 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); -+ return; -+ } -+ -+ while (g_io_channel_read_line (channel, &line, NULL, NULL, NULL) -+ != G_IO_STATUS_EOF && !online) { -+ g_strstrip (line); -+ if (strlen (line) > 0 && g_strcmp0 (line, "lo=lo") != 0) { -+ online = TRUE; -+ } -+ g_free (line); -+ } -+ -+ g_io_channel_shutdown (channel, FALSE, NULL); -+ g_io_channel_unref (channel); -+ -+ if (priv->ifstate_force_online != online) { -+ priv->ifstate_force_online = online; -+ nm_manager_update_state (self); -+ } ++ NMManager *self = NM_MANAGER(user_data); ++ NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE(self); ++ GIOChannel *channel; ++ gchar *line; ++ gboolean online = FALSE; ++ ++ 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); ++ return; ++ } ++ ++ while (g_io_channel_read_line(channel, &line, NULL, NULL, NULL) ++ != G_IO_STATUS_EOF && !online) { ++ g_strstrip(line); ++ if (strlen(line) > 0 && g_strcmp0(line, "lo=lo") != 0) { ++ online = TRUE; ++ } ++ g_free(line); ++ } ++ ++ g_io_channel_shutdown(channel, FALSE, NULL); ++ g_io_channel_unref(channel); ++ ++ if (priv->ifstate_force_online != online) { ++ priv->ifstate_force_online = online; ++ nm_manager_update_state(self); ++ } +} + +static void -+ifstate_file_changed (GFileMonitor *monitor, -+ GFile *file, -+ GFile *other_file, -+ GFileMonitorEvent event_type, -+ gpointer user_data) ++ifstate_file_changed(GFileMonitor *monitor, ++ GFile *file, ++ GFile *other_file, ++ GFileMonitorEvent event_type, ++ gpointer user_data) +{ -+ switch (event_type) { -+// case G_FILE_MONITOR_EVENT_CREATED: ++ switch (event_type) { ++// case G_FILE_MONITOR_EVENT_CREATED: +//#if GLIB_CHECK_VERSION(2,23,4) -+// case G_FILE_MONITOR_EVENT_MOVED: ++// case G_FILE_MONITOR_EVENT_MOVED: +//#endif -+// case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: -+ case G_FILE_MONITOR_EVENT_CHANGED: -+ case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: -+ nm_log_dbg (LOGD_CORE, "ifupdown state file %s was changed", IFUPDOWN_STATE_FILE); -+ check_ifstate_file (user_data); -+ break; -+ default: -+ break; -+ } ++// case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED: ++ case G_FILE_MONITOR_EVENT_CHANGED: ++ case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT: ++ nm_log_dbg(LOGD_CORE, "ifupdown state file %s was changed", IFUPDOWN_STATE_FILE); ++ check_ifstate_file(user_data); ++ break; ++ default: ++ break; ++ } +} + static void - start_factory (NMDeviceFactory *factory, gpointer user_data) - { -@@ -6749,6 +6835,9 @@ nm_manager_start (NMManager *self, GError **error) - nm_clear_g_source (&priv->devices_inited_id); - priv->devices_inited_id = g_idle_add_full (G_PRIORITY_LOW + 10, devices_inited_cb, self, NULL); + impl_manager_get_logging(NMDBusObject * obj, + const NMDBusInterfaceInfoExtended *interface_info, +@@ -6910,6 +6996,9 @@ nm_manager_start(NMManager *self, GError **error) + nm_clear_g_source(&priv->devices_inited_id); + priv->devices_inited_id = g_idle_add_full(G_PRIORITY_LOW + 10, devices_inited_cb, self, NULL); -+ /* Trigger ifupdown state file check */ -+ check_ifstate_file (self); ++ /* Trigger ifupdown state file check */ ++ check_ifstate_file(self); + - return TRUE; + return TRUE; } -@@ -7603,6 +7692,22 @@ nm_manager_init (NMManager *self) - KERNEL_FIRMWARE_DIR); - } - -+ /* Monitor the ifupdown state file */ -+ file = g_file_new_for_path (IFUPDOWN_STATE_FILE); -+ priv->ifstate_monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL, NULL); -+ g_object_unref (file); -+ -+ if (priv->ifstate_monitor) { -+ g_signal_connect (priv->ifstate_monitor, "changed", -+ G_CALLBACK (ifstate_file_changed), -+ self); -+ nm_log_info (LOGD_CORE, "monitoring ifupdown state file '%s'.", -+ IFUPDOWN_STATE_FILE); -+ } else { -+ nm_log_warn (LOGD_CORE, "failed to monitor ifupdown state file '%s'.", -+ IFUPDOWN_STATE_FILE); -+ } -+ - /* Update timestamps in active connections */ - priv->timestamp_update_id = g_timeout_add_seconds (300, (GSourceFunc) periodic_update_active_connection_timestamps, self); +@@ -7789,6 +7878,22 @@ nm_manager_init(NMManager *self) + _LOGW(LOGD_CORE, "failed to monitor kernel firmware directory '%s'.", KERNEL_FIRMWARE_DIR); + } -@@ -7882,6 +7987,16 @@ dispose (GObject *object) - g_clear_object (&priv->fw_monitor); - } ++ /* Monitor the ifupdown state file */ ++ file = g_file_new_for_path(IFUPDOWN_STATE_FILE); ++ priv->ifstate_monitor = g_file_monitor_file(file, G_FILE_MONITOR_NONE, NULL, NULL); ++ g_object_unref(file); ++ ++ if (priv->ifstate_monitor) { ++ g_signal_connect(priv->ifstate_monitor, "changed", ++ G_CALLBACK(ifstate_file_changed), ++ self); ++ nm_log_info(LOGD_CORE, "monitoring ifupdown state file '%s'.", ++ IFUPDOWN_STATE_FILE); ++ } else { ++ nm_log_warn(LOGD_CORE, "failed to monitor ifupdown state file '%s'.", ++ IFUPDOWN_STATE_FILE); ++ } ++ + /* Update timestamps in active connections */ + priv->timestamp_update_id = + g_timeout_add_seconds(300, +@@ -8072,6 +8177,16 @@ dispose(GObject *object) + g_clear_object(&priv->fw_monitor); + } -+ if (priv->ifstate_monitor) { -+ g_signal_handlers_disconnect_by_func (priv->ifstate_monitor, ifstate_file_changed, self); ++ if (priv->ifstate_monitor) { ++ g_signal_handlers_disconnect_by_func(priv->ifstate_monitor, ifstate_file_changed, self); + -+ if (priv->ifstate_force_online) -+ g_source_remove (priv->ifstate_force_online); ++ if (priv->ifstate_force_online) ++ g_source_remove(priv->ifstate_force_online); + -+ g_file_monitor_cancel (priv->ifstate_monitor); -+ g_clear_object (&priv->ifstate_monitor); -+ } ++ g_file_monitor_cancel(priv->ifstate_monitor); ++ g_clear_object(&priv->ifstate_monitor); ++ } + - if (priv->rfkill_mgr) { - g_signal_handlers_disconnect_by_func (priv->rfkill_mgr, rfkill_manager_rfkill_changed_cb, self); - g_clear_object (&priv->rfkill_mgr); + if (priv->rfkill_mgr) { + g_signal_handlers_disconnect_by_func(priv->rfkill_mgr, + rfkill_manager_rfkill_changed_cb, -- cgit 1.3.0-6-gf8a5 From 2ecf014fab3bb25b5843f337340d6f8f6277c2ba Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 5 Oct 2020 23:19:25 +0200 Subject: Update symbols file for libnm0 --- debian/libnm0.symbols | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'debian') diff --git a/debian/libnm0.symbols b/debian/libnm0.symbols index bec7e850..3073b2c8 100644 --- a/debian/libnm0.symbols +++ b/debian/libnm0.symbols @@ -19,6 +19,8 @@ libnm.so.0 libnm0 #MINVER# libnm_1_22_8@libnm_1_22_8 1.22.8 libnm_1_24_0@libnm_1_24_0 1.23.90 libnm_1_26_0@libnm_1_26_0 1.25.90 + libnm_1_26_4@libnm_1_26_4 1.27.90 + libnm_1_28_0@libnm_1_28_0 1.27.90 libnm_1_2_0@libnm_1_2_0 1.1.90 libnm_1_2_4@libnm_1_2_4 1.2.4 libnm_1_4_0@libnm_1_4_0 1.4.0 @@ -932,6 +934,7 @@ libnm.so.0 libnm0 #MINVER# nm_setting_infiniband_new@libnm_1_0_0 1.0.0 nm_setting_ip4_config_get_dhcp_client_id@libnm_1_0_0 1.0.0 nm_setting_ip4_config_get_dhcp_fqdn@libnm_1_2_0 1.1.90 + nm_setting_ip4_config_get_dhcp_vendor_class_identifier@libnm_1_26_4 1.27.90 nm_setting_ip4_config_get_type@libnm_1_0_0 1.0.0 nm_setting_ip4_config_new@libnm_1_0_0 1.0.0 nm_setting_ip6_config_addr_gen_mode_get_type@libnm_1_2_0 1.1.90 @@ -944,12 +947,14 @@ libnm.so.0 libnm0 #MINVER# nm_setting_ip6_config_new@libnm_1_0_0 1.0.0 nm_setting_ip6_config_privacy_get_type@libnm_1_0_0 1.0.0 nm_setting_ip_config_add_address@libnm_1_0_0 1.0.0 + nm_setting_ip_config_add_dhcp_reject_server@libnm_1_28_0 1.27.90 nm_setting_ip_config_add_dns@libnm_1_0_0 1.0.0 nm_setting_ip_config_add_dns_option@libnm_1_2_0 1.1.90 nm_setting_ip_config_add_dns_search@libnm_1_0_0 1.0.0 nm_setting_ip_config_add_route@libnm_1_0_0 1.0.0 nm_setting_ip_config_add_routing_rule@libnm_1_18_0 1.18.0 nm_setting_ip_config_clear_addresses@libnm_1_0_0 1.0.0 + nm_setting_ip_config_clear_dhcp_reject_servers@libnm_1_28_0 1.27.90 nm_setting_ip_config_clear_dns@libnm_1_0_0 1.0.0 nm_setting_ip_config_clear_dns_options@libnm_1_2_0 1.1.90 nm_setting_ip_config_clear_dns_searches@libnm_1_0_0 1.0.0 @@ -959,6 +964,7 @@ libnm.so.0 libnm0 #MINVER# nm_setting_ip_config_get_dad_timeout@libnm_1_2_0 1.1.91 nm_setting_ip_config_get_dhcp_hostname@libnm_1_0_0 1.0.0 nm_setting_ip_config_get_dhcp_hostname_flags@libnm_1_22_0 1.22.0 + nm_setting_ip_config_get_dhcp_reject_servers@libnm_1_28_0 1.27.90 nm_setting_ip_config_get_dhcp_send_hostname@libnm_1_0_0 1.0.0 nm_setting_ip_config_get_dhcp_timeout@libnm_1_2_0 1.1.91 nm_setting_ip_config_get_dns@libnm_1_0_0 1.0.0 @@ -986,6 +992,7 @@ libnm.so.0 libnm0 #MINVER# nm_setting_ip_config_has_dns_options@libnm_1_2_0 1.1.90 nm_setting_ip_config_remove_address@libnm_1_0_0 1.0.0 nm_setting_ip_config_remove_address_by_value@libnm_1_0_0 1.0.0 + nm_setting_ip_config_remove_dhcp_reject_server@libnm_1_28_0 1.27.90 nm_setting_ip_config_remove_dns@libnm_1_0_0 1.0.0 nm_setting_ip_config_remove_dns_by_value@libnm_1_0_0 1.0.0 nm_setting_ip_config_remove_dns_option@libnm_1_2_0 1.1.90 @@ -1335,6 +1342,7 @@ libnm.so.0 libnm0 #MINVER# nm_setting_wireless_add_seen_bssid@libnm_1_0_0 1.0.0 nm_setting_wireless_ap_security_compatible@libnm_1_0_0 1.0.0 nm_setting_wireless_clear_mac_blacklist_items@libnm_1_0_0 1.0.0 + nm_setting_wireless_get_ap_isolation@libnm_1_28_0 1.27.90 nm_setting_wireless_get_band@libnm_1_0_0 1.0.0 nm_setting_wireless_get_bssid@libnm_1_0_0 1.0.0 nm_setting_wireless_get_channel@libnm_1_0_0 1.0.0 -- cgit 1.3.0-6-gf8a5 From 94990fefa3430d3ec0487f18ec71f2c6527a9def Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 5 Oct 2020 23:34:47 +0200 Subject: Release version 1.27.90-1 to unstable --- debian/changelog | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 9709313d..f8a7ad25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,12 @@ -network-manager (1.27.90-1) UNRELEASED; urgency=medium +network-manager (1.27.90-1) unstable; urgency=medium * New upstream version 1.27.90 (1.28 rc1) + - Fix generated XML syntax in tools/generate-docs-nm-settings-docs-gir.py + (Closes: #971144) + * Rebase patches + * Update symbols file for libnm0 - -- Michael Biebl Mon, 05 Oct 2020 22:28:28 +0200 + -- Michael Biebl Mon, 05 Oct 2020 23:34:33 +0200 network-manager (1.26.2-1) unstable; urgency=medium -- cgit 1.3.0-6-gf8a5 From 33cdf7346d8934377fe45441b54f0ff6d8635d8d Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 8 Oct 2020 11:30:00 +0200 Subject: Cherry-pick a couple of upstream patches Hopefully fixes the build and test-suite failures on some of the more exotic architectures. --- .../c-rbtree-reduce-alignment-constraints.patch | 92 ++++++++++++++++++++++ ...djust-regeneration-of-test-code-for-test_.patch | 39 +++++++++ ...rint-details-about-test-failure-for-test_.patch | 38 +++++++++ ...kip-test_platform_ip_address_pretty_sort_.patch | 40 ++++++++++ debian/patches/series | 5 ++ ...ssing_syscall-fix-syscall-numbers-for-mip.patch | 63 +++++++++++++++ 6 files changed, 277 insertions(+) create mode 100644 debian/patches/c-rbtree-reduce-alignment-constraints.patch create mode 100644 debian/patches/platform-tests-adjust-regeneration-of-test-code-for-test_.patch create mode 100644 debian/patches/platform-tests-print-details-about-test-failure-for-test_.patch create mode 100644 debian/patches/platform-tests-skip-test_platform_ip_address_pretty_sort_.patch create mode 100644 debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-mip.patch (limited to 'debian') diff --git a/debian/patches/c-rbtree-reduce-alignment-constraints.patch b/debian/patches/c-rbtree-reduce-alignment-constraints.patch new file mode 100644 index 00000000..787e3097 --- /dev/null +++ b/debian/patches/c-rbtree-reduce-alignment-constraints.patch @@ -0,0 +1,92 @@ +From: David Rheinsberg +Date: Wed, 7 Oct 2020 15:54:15 +0200 +Subject: c-rbtree: reduce alignment constraints + +There are some Debian-supported architectures where `max_align_t` is +only aligned to 4-bytes. This is unfortunate and breaks our assumptions. +While glibc-malloc still guarantees 8 / 16 bytes alignment, this is not +necessarily guaranteed by the C standard (and alternative allocators +will deviate (see jemalloc, for instance)). + +Fortunately, we only need 2 flags, so a 4-byte alignment is more than +enough. + +Reported-by: Thomas Haller +Signed-off-by: David Rheinsberg + +https://github.com/c-util/c-rbtree/pull/4 +(cherry picked from commit 1554936e33718c1a4deea590217e2c19ea6f80de) +(cherry picked from commit 282fac4afbe2ebdf95a9f0210aa8bd745061e8d2) +--- + shared/c-rbtree/src/c-rbtree.c | 14 ++++++++------ + shared/c-rbtree/src/c-rbtree.h | 8 +++----- + 2 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/shared/c-rbtree/src/c-rbtree.c b/shared/c-rbtree/src/c-rbtree.c +index aacdcc2..2f0e608 100644 +--- a/shared/c-rbtree/src/c-rbtree.c ++++ b/shared/c-rbtree/src/c-rbtree.c +@@ -31,15 +31,17 @@ + #include "c-rbtree-private.h" + + /* +- * We use alignas(8) to enforce 64bit alignment of structure fields. This is +- * according to ISO-C11, so we rely on the compiler to implement this. However, +- * at the same time we don't want to exceed native malloc() alignment on target +- * platforms. Hence, we also verify against max_align_t. ++ * We use the lower 2 bits of CRBNode pointers to store flags. Make sure ++ * CRBNode is 4-byte aligned, so the lower 2 bits are actually unused. We also ++ * sometimes store a pointer to the root-node, so make sure this one is also 4 ++ * byte aligned. ++ * Note that there are actually some architectures where `max_align_t` is 4, so ++ * we do not have much wiggle-room to extend this flag-set. + */ + static_assert(alignof(CRBNode) <= alignof(max_align_t), "Invalid RBNode alignment"); +-static_assert(alignof(CRBNode) >= 8, "Invalid CRBNode alignment"); ++static_assert(alignof(CRBNode) >= 4, "Invalid CRBNode alignment"); + static_assert(alignof(CRBTree) <= alignof(max_align_t), "Invalid RBTree alignment"); +-static_assert(alignof(CRBTree) >= 8, "Invalid CRBTree alignment"); ++static_assert(alignof(CRBTree) >= 4, "Invalid CRBTree alignment"); + + /** + * c_rbnode_leftmost() - return leftmost child +diff --git a/shared/c-rbtree/src/c-rbtree.h b/shared/c-rbtree/src/c-rbtree.h +index cb33fcf..a9bbce5 100644 +--- a/shared/c-rbtree/src/c-rbtree.h ++++ b/shared/c-rbtree/src/c-rbtree.h +@@ -27,7 +27,6 @@ extern "C" { + #endif + + #include +-#include + #include + + typedef struct CRBNode CRBNode; +@@ -36,8 +35,7 @@ typedef struct CRBTree CRBTree; + /* implementation detail */ + #define C_RBNODE_RED (0x1UL) + #define C_RBNODE_ROOT (0x2UL) +-#define C_RBNODE_UNUSED3 (0x4UL) +-#define C_RBNODE_FLAG_MASK (0x7UL) ++#define C_RBNODE_FLAG_MASK (0x3UL) + + /** + * struct CRBNode - Node of a Red-Black Tree +@@ -60,7 +58,7 @@ typedef struct CRBTree CRBTree; + * C_RBNODE_INIT. + */ + struct CRBNode { +- alignas(8) unsigned long __parent_and_flags; ++ unsigned long __parent_and_flags; + CRBNode *left; + CRBNode *right; + }; +@@ -90,7 +88,7 @@ void c_rbnode_unlink_stale(CRBNode *n); + * To initialize an RB-Tree, set it to NULL / all zero. + */ + struct CRBTree { +- alignas(8) CRBNode *root; ++ CRBNode *root; + }; + + #define C_RBTREE_INIT {} diff --git a/debian/patches/platform-tests-adjust-regeneration-of-test-code-for-test_.patch b/debian/patches/platform-tests-adjust-regeneration-of-test-code-for-test_.patch new file mode 100644 index 00000000..941204a3 --- /dev/null +++ b/debian/patches/platform-tests-adjust-regeneration-of-test-code-for-test_.patch @@ -0,0 +1,39 @@ +From: Thomas Haller +Date: Wed, 7 Oct 2020 08:39:56 +0200 +Subject: platform/tests: adjust regeneration of test code for + test_platform_ip_address_pretty_sort_cmp() + +Since re-formatting our source code, the generated output no longer +matched the required formatting. Adjust it. + +(cherry picked from commit 4fc79734985f661c7c28c56a558f00a795b9abf3) +(cherry picked from commit 07868a535f2454a7bdc7d1af9b96d8686d9f7dca) +--- + src/platform/tests/test-platform-general.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/src/platform/tests/test-platform-general.c b/src/platform/tests/test-platform-general.c +index f98f84c..aca4413 100644 +--- a/src/platform/tests/test-platform-general.c ++++ b/src/platform/tests/test-platform-general.c +@@ -692,14 +692,16 @@ test_platform_ip_address_pretty_sort_cmp(gconstpointer test_data) + } + + if (PRINT_RESULT) { +- g_print("\n\n\t\t[%d] = (\n", TEST_DATA_I); ++ g_print("\n [%d] = (", TEST_DATA_I); + for (i = 0; i < ELM_SIZE * N_ADDRESSES;) { +- g_print("\t\t\t\""); ++ if (i > 0) ++ g_print("\n "); ++ g_print("\""); + for (j = 0; j < 40 && i < ELM_SIZE * N_ADDRESSES; j++, i++) + g_print("%02x", addresses[i]); +- g_print("\"\n"); ++ g_print("\""); + } +- g_print("\t\t),\n\n"); ++ g_print("),\n"); + return; + } + diff --git a/debian/patches/platform-tests-print-details-about-test-failure-for-test_.patch b/debian/patches/platform-tests-print-details-about-test-failure-for-test_.patch new file mode 100644 index 00000000..63a980be --- /dev/null +++ b/debian/patches/platform-tests-print-details-about-test-failure-for-test_.patch @@ -0,0 +1,38 @@ +From: Thomas Haller +Date: Wed, 7 Oct 2020 09:00:41 +0200 +Subject: platform/tests: print details about test failure for + test_platform_ip_address_pretty_sort_cmp() + +When the test is about to fail, print the wrong data to help debugging +the test failure. + +(cherry picked from commit 3576f541003106fb4ba7b41138a57f8e4a6e7d18) +(cherry picked from commit 36ccbcc550a981688eee6a83bfc55324cdd0c874) +--- + src/platform/tests/test-platform-general.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/src/platform/tests/test-platform-general.c b/src/platform/tests/test-platform-general.c +index aca4413..ee1e247 100644 +--- a/src/platform/tests/test-platform-general.c ++++ b/src/platform/tests/test-platform-general.c +@@ -715,6 +715,19 @@ test_platform_ip_address_pretty_sort_cmp(gconstpointer test_data) + NULL, + 0, + &bin_len); ++ ++ if (bin_len != ELM_SIZE * N_ADDRESSES || memcmp(addresses, bin_arr, bin_len) != 0) { ++ char *addresses_str = nm_utils_bin2hexstr(addresses, ELM_SIZE * N_ADDRESSES, -1); ++ ++ g_error(">>> test_platform_ip_address_pretty_sort_cmp() will fail:\n" ++ ">>> addresses[%zu]: %s\n" ++ ">>> expected [%zu]: %s\n", ++ ELM_SIZE * N_ADDRESSES, ++ addresses_str, ++ bin_len, ++ EXPECTED_BUFFER[TEST_DATA_I]); ++ } ++ + g_assert_cmpmem(addresses, ELM_SIZE * N_ADDRESSES, bin_arr, bin_len); + } + } diff --git a/debian/patches/platform-tests-skip-test_platform_ip_address_pretty_sort_.patch b/debian/patches/platform-tests-skip-test_platform_ip_address_pretty_sort_.patch new file mode 100644 index 00000000..71376190 --- /dev/null +++ b/debian/patches/platform-tests-skip-test_platform_ip_address_pretty_sort_.patch @@ -0,0 +1,40 @@ +From: Thomas Haller +Date: Wed, 7 Oct 2020 09:08:57 +0200 +Subject: platform/tests: skip test_platform_ip_address_pretty_sort_cmp() on + non-amd64 archs + +The test only works on amd64, because it relies on the memory layout of +the structures. + +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/546 +(cherry picked from commit 6cf7c6739f670bb8ae2e1b8cbc56c789a0b0ae0d) +(cherry picked from commit b569687f5f363fa83f2518c97d51abce5a518b64) +--- + src/platform/tests/test-platform-general.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/src/platform/tests/test-platform-general.c b/src/platform/tests/test-platform-general.c +index ee1e247..703c886 100644 +--- a/src/platform/tests/test-platform-general.c ++++ b/src/platform/tests/test-platform-general.c +@@ -555,6 +555,20 @@ test_platform_ip_address_pretty_sort_cmp(gconstpointer test_data) + gs_free guint64 *rand_map = NULL; + gsize i, j; + ++#if !defined(__amd64__) ++ /* The test generates a random array of NMPlatformIPXAddress (by crudely randomizing the memory, ++ * not the structures themself) and then compares the sorted result with the expected output. ++ * The sole purpose is to ensure that the sorting order stays stable. ++ * ++ * This only works on an architecture for which the test was made, otherwise ++ * the expected data does not match (due to different layout of the structures ++ * in memory). ++ * ++ * That's fine. Skip the test. */ ++ g_test_skip("skip test on non-amd64 architecture"); ++ return; ++#endif ++ + /* + * First we create a list of addresses filled with (stable) random bytes. + * We tweak some fields explicitly (stable randomly), so that we cover all diff --git a/debian/patches/series b/debian/patches/series index a2d7e06d..117a27db 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,6 @@ Force-online-state-with-unmanaged-devices.patch +platform-tests-adjust-regeneration-of-test-code-for-test_.patch +platform-tests-print-details-about-test-failure-for-test_.patch +platform-tests-skip-test_platform_ip_address_pretty_sort_.patch +c-rbtree-reduce-alignment-constraints.patch +systemd-basic-missing_syscall-fix-syscall-numbers-for-mip.patch diff --git a/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-mip.patch b/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-mip.patch new file mode 100644 index 00000000..6acf5aa2 --- /dev/null +++ b/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-mip.patch @@ -0,0 +1,63 @@ +From: Michael Biebl +Date: Wed, 7 Oct 2020 17:44:05 +0200 +Subject: systemd: basic/missing_syscall: fix syscall numbers for mips* + +Thanks Christian Brauner @brauner + +https://github.com/systemd/systemd/commit/cd2065989163a5b6f71c8f1e4a8d73f1be63a52b + +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/545 +(cherry picked from commit e9c6561ffade614e9341769b5e37a9d0436e693b) +(cherry picked from commit dfd54b7f2eb65f9d4909d501c1ec9ff5333e170e) +--- + shared/systemd/src/basic/missing_syscall.h | 28 ++++++++++++++++++++++++++-- + 1 file changed, 26 insertions(+), 2 deletions(-) + +diff --git a/shared/systemd/src/basic/missing_syscall.h b/shared/systemd/src/basic/missing_syscall.h +index 4aed6e7..d11a77d 100644 +--- a/shared/systemd/src/basic/missing_syscall.h ++++ b/shared/systemd/src/basic/missing_syscall.h +@@ -632,8 +632,20 @@ static inline long missing_get_mempolicy(int *mode, unsigned long *nodemask, + /* ======================================================================= */ + + /* should be always defined, see kernel 39036cd2727395c3369b1051005da74059a85317 */ +-#if defined(__alpha__) ++#if defined __alpha__ + # define systemd_NR_pidfd_send_signal 534 ++#elif defined _MIPS_SIM ++# if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ ++# define systemd_NR_pidfd_send_signal (424 + 4000) ++# endif ++# if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ ++# define systemd_NR_pidfd_send_signal (424 + 6000) ++# endif ++# if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ ++# define systemd_NR_pidfd_send_signal (424 + 5000) ++# endif ++#elif defined __ia64__ ++# define systemd_NR_pidfd_send_signal (424 + 1024) + #else + # define systemd_NR_pidfd_send_signal 424 + #endif +@@ -664,8 +676,20 @@ static inline int missing_pidfd_send_signal(int fd, int sig, siginfo_t *info, un + #endif + + /* should be always defined, see kernel 7615d9e1780e26e0178c93c55b73309a5dc093d7 */ +-#if defined(__alpha__) ++#if defined __alpha__ + # define systemd_NR_pidfd_open 544 ++#elif defined _MIPS_SIM ++# if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ ++# define systemd_NR_pidfd_open (434 + 4000) ++# endif ++# if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ ++# define systemd_NR_pidfd_open (434 + 6000) ++# endif ++# if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ ++# define systemd_NR_pidfd_open (434 + 5000) ++# endif ++#elif defined __ia64__ ++# define systemd_NR_pidfd_open (434 + 1024) + #else + # define systemd_NR_pidfd_open 434 + #endif -- cgit 1.3.0-6-gf8a5 From 6deec21de449a61feef59b7cd79934b87de13243 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 8 Oct 2020 11:35:00 +0200 Subject: Release version 1.27.90-2 to unstable --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f8a7ad25..d994002c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +network-manager (1.27.90-2) unstable; urgency=medium + + * Cherry-pick a couple of upstream patches. + Hopefully fixes the build and test-suite failures on some of the more + exotic architectures. + + -- Michael Biebl Thu, 08 Oct 2020 11:34:31 +0200 + network-manager (1.27.90-1) unstable; urgency=medium * New upstream version 1.27.90 (1.28 rc1) -- cgit 1.3.0-6-gf8a5 From e8633d5e6f4d2c46fbb6e14608bda7dff82ff071 Mon Sep 17 00:00:00 2001 From: Thorsten Glaser Date: Fri, 9 Oct 2020 16:00:39 +0200 Subject: Adjust syscall numbers for x32 vs. amd64, fixes FTBFS on x32 --- debian/changelog | 6 + debian/patches/series | 1 + ...ssing_syscall-fix-syscall-numbers-for-x32.patch | 124 +++++++++++++++++++++ 3 files changed, 131 insertions(+) create mode 100644 debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d994002c..b06a47fd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +network-manager (1.27.90-3) UNRELEASED; urgency=medium + + * Adjust syscall numbers for x32 vs. amd64, fixes FTBFS on x32 + + -- Thorsten Glaser Thu, 08 Oct 2020 21:04:51 +0200 + network-manager (1.27.90-2) unstable; urgency=medium * Cherry-pick a couple of upstream patches. diff --git a/debian/patches/series b/debian/patches/series index 117a27db..78fcb807 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ platform-tests-print-details-about-test-failure-for-test_.patch platform-tests-skip-test_platform_ip_address_pretty_sort_.patch c-rbtree-reduce-alignment-constraints.patch systemd-basic-missing_syscall-fix-syscall-numbers-for-mip.patch +systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch diff --git a/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch b/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch new file mode 100644 index 00000000..75b2fd2b --- /dev/null +++ b/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch @@ -0,0 +1,124 @@ +From: mirabilos +Date: Fri, 9 Oct 2020 15:58:48 +0200 +Subject: fixup syscall numbers for x32 vs. amd64 + +--- + shared/systemd/src/basic/missing_syscall.h | 28 +++++++++++++++++----------- + 1 file changed, 17 insertions(+), 11 deletions(-) + +diff --git a/shared/systemd/src/basic/missing_syscall.h b/shared/systemd/src/basic/missing_syscall.h +index d11a77d..82daa68 100644 +--- a/shared/systemd/src/basic/missing_syscall.h ++++ b/shared/systemd/src/basic/missing_syscall.h +@@ -15,6 +15,12 @@ + #include + #endif + ++#if defined(__x86_64__) && defined(__ILP32__) ++#define systemd_SC_arch_bias(x) ((x) | /* __X32_SYSCALL_BIT */ 0x40000000) ++#else ++#define systemd_SC_arch_bias(x) (x) ++#endif ++ + #include "missing_keyctl.h" + #include "missing_stat.h" + +@@ -36,7 +42,7 @@ static inline int missing_pivot_root(const char *new_root, const char *put_old) + /* ======================================================================= */ + + #if defined __x86_64__ +-# define systemd_NR_memfd_create 319 ++# define systemd_NR_memfd_create systemd_SC_arch_bias(319) + #elif defined __arm__ + # define systemd_NR_memfd_create 385 + #elif defined __aarch64__ +@@ -93,7 +99,7 @@ static inline int missing_memfd_create(const char *name, unsigned int flags) { + /* ======================================================================= */ + + #if defined __x86_64__ +-# define systemd_NR_getrandom 318 ++# define systemd_NR_getrandom systemd_SC_arch_bias(318) + #elif defined(__i386__) + # define systemd_NR_getrandom 355 + #elif defined(__arm__) +@@ -169,7 +175,7 @@ static inline pid_t missing_gettid(void) { + /* ======================================================================= */ + + #if defined(__x86_64__) +-# define systemd_NR_name_to_handle_at 303 ++# define systemd_NR_name_to_handle_at systemd_SC_arch_bias(303) + #elif defined(__i386__) + # define systemd_NR_name_to_handle_at 341 + #elif defined(__arm__) +@@ -226,7 +232,7 @@ static inline int missing_name_to_handle_at(int fd, const char *name, struct fil + #elif defined __arm__ + # define systemd_NR_setns 375 + #elif defined(__x86_64__) +-# define systemd_NR_setns 308 ++# define systemd_NR_setns systemd_SC_arch_bias(308) + #elif defined(__i386__) + # define systemd_NR_setns 346 + #elif defined(__powerpc__) +@@ -279,7 +285,7 @@ static inline pid_t raw_getpid(void) { + /* ======================================================================= */ + + #if defined __x86_64__ +-# define systemd_NR_renameat2 316 ++# define systemd_NR_renameat2 systemd_SC_arch_bias(316) + #elif defined __arm__ + # define systemd_NR_renameat2 382 + #elif defined __aarch64__ +@@ -388,7 +394,7 @@ static inline key_serial_t missing_request_key(const char *type, const char *des + /* ======================================================================= */ + + #if defined(__x86_64__) +-# define systemd_NR_copy_file_range 326 ++# define systemd_NR_copy_file_range systemd_SC_arch_bias(326) + #elif defined(__i386__) + # define systemd_NR_copy_file_range 377 + #elif defined __s390__ +@@ -440,7 +446,7 @@ static inline ssize_t missing_copy_file_range(int fd_in, loff_t *off_in, + #if defined __i386__ + # define systemd_NR_bpf 357 + #elif defined __x86_64__ +-# define systemd_NR_bpf 321 ++# define systemd_NR_bpf systemd_SC_arch_bias(321) + #elif defined __aarch64__ + # define systemd_NR_bpf 280 + #elif defined __arm__ +@@ -492,7 +498,7 @@ static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) { + # if defined __i386__ + # define systemd_NR_pkey_mprotect 380 + # elif defined __x86_64__ +-# define systemd_NR_pkey_mprotect 329 ++# define systemd_NR_pkey_mprotect systemd_SC_arch_bias(329) + # elif defined __aarch64__ + # define systemd_NR_pkey_mprotect 288 + # elif defined __arm__ +@@ -545,7 +551,7 @@ assert_cc(__NR_pkey_mprotect == systemd_NR_pkey_mprotect); + #elif defined __sparc__ + # define systemd_NR_statx 360 + #elif defined __x86_64__ +-# define systemd_NR_statx 332 ++# define systemd_NR_statx systemd_SC_arch_bias(332) + #else + # warning "statx() syscall number unknown for your architecture" + #endif +@@ -647,7 +653,7 @@ static inline long missing_get_mempolicy(int *mode, unsigned long *nodemask, + #elif defined __ia64__ + # define systemd_NR_pidfd_send_signal (424 + 1024) + #else +-# define systemd_NR_pidfd_send_signal 424 ++# define systemd_NR_pidfd_send_signal systemd_SC_arch_bias(424) + #endif + + /* may be (invalid) negative number due to libseccomp, see PR 13319 */ +@@ -691,7 +697,7 @@ static inline int missing_pidfd_send_signal(int fd, int sig, siginfo_t *info, un + #elif defined __ia64__ + # define systemd_NR_pidfd_open (434 + 1024) + #else +-# define systemd_NR_pidfd_open 434 ++# define systemd_NR_pidfd_open systemd_SC_arch_bias(434) + #endif + + /* may be (invalid) negative number due to libseccomp, see PR 13319 */ -- cgit 1.3.0-6-gf8a5 From b4dab9a9dd24d8d70e1bb288078570e85ad43b96 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 9 Oct 2020 16:03:33 +0200 Subject: Release version 1.27.90-3 to unstable --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b06a47fd..ddbe10e8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ -network-manager (1.27.90-3) UNRELEASED; urgency=medium +network-manager (1.27.90-3) unstable; urgency=medium + [ Thorsten Glaser ] * Adjust syscall numbers for x32 vs. amd64, fixes FTBFS on x32 - -- Thorsten Glaser Thu, 08 Oct 2020 21:04:51 +0200 + -- Michael Biebl Fri, 09 Oct 2020 16:03:16 +0200 network-manager (1.27.90-2) unstable; urgency=medium -- cgit 1.3.0-6-gf8a5 From 0eeddde66a7917091e0ce693de2b96e345a11f97 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 20 Oct 2020 22:08:44 +0200 Subject: New upstream version 1.27.91 (1.28 rc2) --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ddbe10e8..b3befbc1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +network-manager (1.27.91-1) UNRELEASED; urgency=medium + + * New upstream version 1.27.91 (1.28 rc2) + + -- Michael Biebl Tue, 20 Oct 2020 22:08:28 +0200 + network-manager (1.27.90-3) unstable; urgency=medium [ Thorsten Glaser ] -- cgit 1.3.0-6-gf8a5 From 7d33d1faff5e4d2827491a90fc66c4080e5e76be Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 20 Oct 2020 22:16:24 +0200 Subject: Rebase patches --- .../c-rbtree-reduce-alignment-constraints.patch | 92 ---------------------- ...djust-regeneration-of-test-code-for-test_.patch | 39 --------- ...rint-details-about-test-failure-for-test_.patch | 38 --------- ...kip-test_platform_ip_address_pretty_sort_.patch | 40 ---------- debian/patches/series | 5 -- ...ssing_syscall-fix-syscall-numbers-for-mip.patch | 63 --------------- 6 files changed, 277 deletions(-) delete mode 100644 debian/patches/c-rbtree-reduce-alignment-constraints.patch delete mode 100644 debian/patches/platform-tests-adjust-regeneration-of-test-code-for-test_.patch delete mode 100644 debian/patches/platform-tests-print-details-about-test-failure-for-test_.patch delete mode 100644 debian/patches/platform-tests-skip-test_platform_ip_address_pretty_sort_.patch delete mode 100644 debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-mip.patch (limited to 'debian') diff --git a/debian/patches/c-rbtree-reduce-alignment-constraints.patch b/debian/patches/c-rbtree-reduce-alignment-constraints.patch deleted file mode 100644 index 787e3097..00000000 --- a/debian/patches/c-rbtree-reduce-alignment-constraints.patch +++ /dev/null @@ -1,92 +0,0 @@ -From: David Rheinsberg -Date: Wed, 7 Oct 2020 15:54:15 +0200 -Subject: c-rbtree: reduce alignment constraints - -There are some Debian-supported architectures where `max_align_t` is -only aligned to 4-bytes. This is unfortunate and breaks our assumptions. -While glibc-malloc still guarantees 8 / 16 bytes alignment, this is not -necessarily guaranteed by the C standard (and alternative allocators -will deviate (see jemalloc, for instance)). - -Fortunately, we only need 2 flags, so a 4-byte alignment is more than -enough. - -Reported-by: Thomas Haller -Signed-off-by: David Rheinsberg - -https://github.com/c-util/c-rbtree/pull/4 -(cherry picked from commit 1554936e33718c1a4deea590217e2c19ea6f80de) -(cherry picked from commit 282fac4afbe2ebdf95a9f0210aa8bd745061e8d2) ---- - shared/c-rbtree/src/c-rbtree.c | 14 ++++++++------ - shared/c-rbtree/src/c-rbtree.h | 8 +++----- - 2 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/shared/c-rbtree/src/c-rbtree.c b/shared/c-rbtree/src/c-rbtree.c -index aacdcc2..2f0e608 100644 ---- a/shared/c-rbtree/src/c-rbtree.c -+++ b/shared/c-rbtree/src/c-rbtree.c -@@ -31,15 +31,17 @@ - #include "c-rbtree-private.h" - - /* -- * We use alignas(8) to enforce 64bit alignment of structure fields. This is -- * according to ISO-C11, so we rely on the compiler to implement this. However, -- * at the same time we don't want to exceed native malloc() alignment on target -- * platforms. Hence, we also verify against max_align_t. -+ * We use the lower 2 bits of CRBNode pointers to store flags. Make sure -+ * CRBNode is 4-byte aligned, so the lower 2 bits are actually unused. We also -+ * sometimes store a pointer to the root-node, so make sure this one is also 4 -+ * byte aligned. -+ * Note that there are actually some architectures where `max_align_t` is 4, so -+ * we do not have much wiggle-room to extend this flag-set. - */ - static_assert(alignof(CRBNode) <= alignof(max_align_t), "Invalid RBNode alignment"); --static_assert(alignof(CRBNode) >= 8, "Invalid CRBNode alignment"); -+static_assert(alignof(CRBNode) >= 4, "Invalid CRBNode alignment"); - static_assert(alignof(CRBTree) <= alignof(max_align_t), "Invalid RBTree alignment"); --static_assert(alignof(CRBTree) >= 8, "Invalid CRBTree alignment"); -+static_assert(alignof(CRBTree) >= 4, "Invalid CRBTree alignment"); - - /** - * c_rbnode_leftmost() - return leftmost child -diff --git a/shared/c-rbtree/src/c-rbtree.h b/shared/c-rbtree/src/c-rbtree.h -index cb33fcf..a9bbce5 100644 ---- a/shared/c-rbtree/src/c-rbtree.h -+++ b/shared/c-rbtree/src/c-rbtree.h -@@ -27,7 +27,6 @@ extern "C" { - #endif - - #include --#include - #include - - typedef struct CRBNode CRBNode; -@@ -36,8 +35,7 @@ typedef struct CRBTree CRBTree; - /* implementation detail */ - #define C_RBNODE_RED (0x1UL) - #define C_RBNODE_ROOT (0x2UL) --#define C_RBNODE_UNUSED3 (0x4UL) --#define C_RBNODE_FLAG_MASK (0x7UL) -+#define C_RBNODE_FLAG_MASK (0x3UL) - - /** - * struct CRBNode - Node of a Red-Black Tree -@@ -60,7 +58,7 @@ typedef struct CRBTree CRBTree; - * C_RBNODE_INIT. - */ - struct CRBNode { -- alignas(8) unsigned long __parent_and_flags; -+ unsigned long __parent_and_flags; - CRBNode *left; - CRBNode *right; - }; -@@ -90,7 +88,7 @@ void c_rbnode_unlink_stale(CRBNode *n); - * To initialize an RB-Tree, set it to NULL / all zero. - */ - struct CRBTree { -- alignas(8) CRBNode *root; -+ CRBNode *root; - }; - - #define C_RBTREE_INIT {} diff --git a/debian/patches/platform-tests-adjust-regeneration-of-test-code-for-test_.patch b/debian/patches/platform-tests-adjust-regeneration-of-test-code-for-test_.patch deleted file mode 100644 index 941204a3..00000000 --- a/debian/patches/platform-tests-adjust-regeneration-of-test-code-for-test_.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Thomas Haller -Date: Wed, 7 Oct 2020 08:39:56 +0200 -Subject: platform/tests: adjust regeneration of test code for - test_platform_ip_address_pretty_sort_cmp() - -Since re-formatting our source code, the generated output no longer -matched the required formatting. Adjust it. - -(cherry picked from commit 4fc79734985f661c7c28c56a558f00a795b9abf3) -(cherry picked from commit 07868a535f2454a7bdc7d1af9b96d8686d9f7dca) ---- - src/platform/tests/test-platform-general.c | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/src/platform/tests/test-platform-general.c b/src/platform/tests/test-platform-general.c -index f98f84c..aca4413 100644 ---- a/src/platform/tests/test-platform-general.c -+++ b/src/platform/tests/test-platform-general.c -@@ -692,14 +692,16 @@ test_platform_ip_address_pretty_sort_cmp(gconstpointer test_data) - } - - if (PRINT_RESULT) { -- g_print("\n\n\t\t[%d] = (\n", TEST_DATA_I); -+ g_print("\n [%d] = (", TEST_DATA_I); - for (i = 0; i < ELM_SIZE * N_ADDRESSES;) { -- g_print("\t\t\t\""); -+ if (i > 0) -+ g_print("\n "); -+ g_print("\""); - for (j = 0; j < 40 && i < ELM_SIZE * N_ADDRESSES; j++, i++) - g_print("%02x", addresses[i]); -- g_print("\"\n"); -+ g_print("\""); - } -- g_print("\t\t),\n\n"); -+ g_print("),\n"); - return; - } - diff --git a/debian/patches/platform-tests-print-details-about-test-failure-for-test_.patch b/debian/patches/platform-tests-print-details-about-test-failure-for-test_.patch deleted file mode 100644 index 63a980be..00000000 --- a/debian/patches/platform-tests-print-details-about-test-failure-for-test_.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Thomas Haller -Date: Wed, 7 Oct 2020 09:00:41 +0200 -Subject: platform/tests: print details about test failure for - test_platform_ip_address_pretty_sort_cmp() - -When the test is about to fail, print the wrong data to help debugging -the test failure. - -(cherry picked from commit 3576f541003106fb4ba7b41138a57f8e4a6e7d18) -(cherry picked from commit 36ccbcc550a981688eee6a83bfc55324cdd0c874) ---- - src/platform/tests/test-platform-general.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/src/platform/tests/test-platform-general.c b/src/platform/tests/test-platform-general.c -index aca4413..ee1e247 100644 ---- a/src/platform/tests/test-platform-general.c -+++ b/src/platform/tests/test-platform-general.c -@@ -715,6 +715,19 @@ test_platform_ip_address_pretty_sort_cmp(gconstpointer test_data) - NULL, - 0, - &bin_len); -+ -+ if (bin_len != ELM_SIZE * N_ADDRESSES || memcmp(addresses, bin_arr, bin_len) != 0) { -+ char *addresses_str = nm_utils_bin2hexstr(addresses, ELM_SIZE * N_ADDRESSES, -1); -+ -+ g_error(">>> test_platform_ip_address_pretty_sort_cmp() will fail:\n" -+ ">>> addresses[%zu]: %s\n" -+ ">>> expected [%zu]: %s\n", -+ ELM_SIZE * N_ADDRESSES, -+ addresses_str, -+ bin_len, -+ EXPECTED_BUFFER[TEST_DATA_I]); -+ } -+ - g_assert_cmpmem(addresses, ELM_SIZE * N_ADDRESSES, bin_arr, bin_len); - } - } diff --git a/debian/patches/platform-tests-skip-test_platform_ip_address_pretty_sort_.patch b/debian/patches/platform-tests-skip-test_platform_ip_address_pretty_sort_.patch deleted file mode 100644 index 71376190..00000000 --- a/debian/patches/platform-tests-skip-test_platform_ip_address_pretty_sort_.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Thomas Haller -Date: Wed, 7 Oct 2020 09:08:57 +0200 -Subject: platform/tests: skip test_platform_ip_address_pretty_sort_cmp() on - non-amd64 archs - -The test only works on amd64, because it relies on the memory layout of -the structures. - -https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/546 -(cherry picked from commit 6cf7c6739f670bb8ae2e1b8cbc56c789a0b0ae0d) -(cherry picked from commit b569687f5f363fa83f2518c97d51abce5a518b64) ---- - src/platform/tests/test-platform-general.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/src/platform/tests/test-platform-general.c b/src/platform/tests/test-platform-general.c -index ee1e247..703c886 100644 ---- a/src/platform/tests/test-platform-general.c -+++ b/src/platform/tests/test-platform-general.c -@@ -555,6 +555,20 @@ test_platform_ip_address_pretty_sort_cmp(gconstpointer test_data) - gs_free guint64 *rand_map = NULL; - gsize i, j; - -+#if !defined(__amd64__) -+ /* The test generates a random array of NMPlatformIPXAddress (by crudely randomizing the memory, -+ * not the structures themself) and then compares the sorted result with the expected output. -+ * The sole purpose is to ensure that the sorting order stays stable. -+ * -+ * This only works on an architecture for which the test was made, otherwise -+ * the expected data does not match (due to different layout of the structures -+ * in memory). -+ * -+ * That's fine. Skip the test. */ -+ g_test_skip("skip test on non-amd64 architecture"); -+ return; -+#endif -+ - /* - * First we create a list of addresses filled with (stable) random bytes. - * We tweak some fields explicitly (stable randomly), so that we cover all diff --git a/debian/patches/series b/debian/patches/series index 78fcb807..b718f8ef 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,7 +1,2 @@ Force-online-state-with-unmanaged-devices.patch -platform-tests-adjust-regeneration-of-test-code-for-test_.patch -platform-tests-print-details-about-test-failure-for-test_.patch -platform-tests-skip-test_platform_ip_address_pretty_sort_.patch -c-rbtree-reduce-alignment-constraints.patch -systemd-basic-missing_syscall-fix-syscall-numbers-for-mip.patch systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch diff --git a/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-mip.patch b/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-mip.patch deleted file mode 100644 index 6acf5aa2..00000000 --- a/debian/patches/systemd-basic-missing_syscall-fix-syscall-numbers-for-mip.patch +++ /dev/null @@ -1,63 +0,0 @@ -From: Michael Biebl -Date: Wed, 7 Oct 2020 17:44:05 +0200 -Subject: systemd: basic/missing_syscall: fix syscall numbers for mips* - -Thanks Christian Brauner @brauner - -https://github.com/systemd/systemd/commit/cd2065989163a5b6f71c8f1e4a8d73f1be63a52b - -https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/545 -(cherry picked from commit e9c6561ffade614e9341769b5e37a9d0436e693b) -(cherry picked from commit dfd54b7f2eb65f9d4909d501c1ec9ff5333e170e) ---- - shared/systemd/src/basic/missing_syscall.h | 28 ++++++++++++++++++++++++++-- - 1 file changed, 26 insertions(+), 2 deletions(-) - -diff --git a/shared/systemd/src/basic/missing_syscall.h b/shared/systemd/src/basic/missing_syscall.h -index 4aed6e7..d11a77d 100644 ---- a/shared/systemd/src/basic/missing_syscall.h -+++ b/shared/systemd/src/basic/missing_syscall.h -@@ -632,8 +632,20 @@ static inline long missing_get_mempolicy(int *mode, unsigned long *nodemask, - /* ======================================================================= */ - - /* should be always defined, see kernel 39036cd2727395c3369b1051005da74059a85317 */ --#if defined(__alpha__) -+#if defined __alpha__ - # define systemd_NR_pidfd_send_signal 534 -+#elif defined _MIPS_SIM -+# if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ -+# define systemd_NR_pidfd_send_signal (424 + 4000) -+# endif -+# if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ -+# define systemd_NR_pidfd_send_signal (424 + 6000) -+# endif -+# if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ -+# define systemd_NR_pidfd_send_signal (424 + 5000) -+# endif -+#elif defined __ia64__ -+# define systemd_NR_pidfd_send_signal (424 + 1024) - #else - # define systemd_NR_pidfd_send_signal 424 - #endif -@@ -664,8 +676,20 @@ static inline int missing_pidfd_send_signal(int fd, int sig, siginfo_t *info, un - #endif - - /* should be always defined, see kernel 7615d9e1780e26e0178c93c55b73309a5dc093d7 */ --#if defined(__alpha__) -+#if defined __alpha__ - # define systemd_NR_pidfd_open 544 -+#elif defined _MIPS_SIM -+# if _MIPS_SIM == _MIPS_SIM_ABI32 /* o32 */ -+# define systemd_NR_pidfd_open (434 + 4000) -+# endif -+# if _MIPS_SIM == _MIPS_SIM_NABI32 /* n32 */ -+# define systemd_NR_pidfd_open (434 + 6000) -+# endif -+# if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */ -+# define systemd_NR_pidfd_open (434 + 5000) -+# endif -+#elif defined __ia64__ -+# define systemd_NR_pidfd_open (434 + 1024) - #else - # define systemd_NR_pidfd_open 434 - #endif -- cgit 1.3.0-6-gf8a5 From 68d92b660f932399f84be0a07768b0776a813701 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 20 Oct 2020 22:36:48 +0200 Subject: Release version 1.27.91-1 to unstable --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b3befbc1..1b5a37e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ -network-manager (1.27.91-1) UNRELEASED; urgency=medium +network-manager (1.27.91-1) unstable; urgency=medium * New upstream version 1.27.91 (1.28 rc2) + * Rebase patches - -- Michael Biebl Tue, 20 Oct 2020 22:08:28 +0200 + -- Michael Biebl Tue, 20 Oct 2020 22:36:31 +0200 network-manager (1.27.90-3) unstable; urgency=medium -- cgit 1.3.0-6-gf8a5 From d29959d2d2f73661d3ff7018c40a39a993f67784 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 25 Nov 2020 14:57:56 +0100 Subject: Revert "dns: change default DNS priority of VPNs to -50" Closes: #972688 --- ...change-default-DNS-priority-of-VPNs-to-50.patch | 103 +++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 104 insertions(+) create mode 100644 debian/patches/Revert-dns-change-default-DNS-priority-of-VPNs-to-50.patch (limited to 'debian') diff --git a/debian/patches/Revert-dns-change-default-DNS-priority-of-VPNs-to-50.patch b/debian/patches/Revert-dns-change-default-DNS-priority-of-VPNs-to-50.patch new file mode 100644 index 00000000..b632e277 --- /dev/null +++ b/debian/patches/Revert-dns-change-default-DNS-priority-of-VPNs-to-50.patch @@ -0,0 +1,103 @@ +From: Thomas Haller +Date: Fri, 20 Nov 2020 18:43:05 +0100 +Subject: Revert "dns: change default DNS priority of VPNs to -50" + +Revert this change. One problem is that none of the current GUIs +(nm-connection-editor, gnome-control-center, plasma-nm) expose the +dns-priority option. So, users tend to have their profile value set to +0. Changing the default means for them not only a change in behavior, +but its hard to fix via the GUI. + +Also, what other call DNS leaks, is Split DNS to some. Both uses make +sense, but have conflicting goals. The default cannot accommodate both +at the same time. + +Also, with split DNS enabled (dnsmasq, systemd-resolved), the concern +for DNS leaks is smaller. Imagine: + + Wi-Fi profile with ipv4.dns-priority (effectively) 100, domain "example.com". + VPN profile with ipv4.dns-priority (effectively) 50 and a default route. + +That is a common setup that one gets by default (and what probably many +users have today). In such a case with split DNS enabled, the Wi-Fi's DNS +server only sees requests for "*.example.com". So, it does not leak +everything. + +Hence, revert this change before 1.28.0 release to the earlier behavior. + +This reverts commit af13081bec8bf5cbe961df4c4577a7e4c7b14e97. + +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/688 +(cherry picked from commit ff71bbdc4236d1e36685b07c659b80481c6ab129) +(cherry picked from commit 034db883b3cdb94cfa880c04deba0b31a938bf8a) +--- + NEWS | 5 ----- + clients/common/settings-docs.h.in | 4 ++-- + libnm-core/nm-setting-ip-config.c | 2 +- + src/dns/nm-dns-manager.h | 2 +- + 4 files changed, 4 insertions(+), 9 deletions(-) + +diff --git a/NEWS b/NEWS +index 8ebc913..03e4e8b 100644 +--- a/NEWS ++++ b/NEWS +@@ -35,11 +35,6 @@ USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE! + interfaces. + * Add a new provider for nm-cloud-setup to support automatic network + configuration on Azure. +-* Change the default DNS priority for VPNs from 50 to -50. This is a +- change in behavior and means that when connecting to a VPN with the +- default route, DNS queries will never leak to local resolvers. To +- restore the old behavior, set the DNS priority of the connection to +- 50. + * The initrd generator now supports creating Infiniband connections. + * Fix running DHCPv6-PD over PPPoE. + * Fix building NetworkManager with LTO (Link Time Optimization). +diff --git a/clients/common/settings-docs.h.in b/clients/common/settings-docs.h.in +index 5b93627..58fc92e 100644 +--- a/clients/common/settings-docs.h.in ++++ b/clients/common/settings-docs.h.in +@@ -234,7 +234,7 @@ + #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_VENDOR_CLASS_IDENTIFIER N_("The Vendor Class Identifier DHCP option (60). Special characters in the data string may be escaped using C-style escapes, nevertheless this property cannot contain nul bytes. If the per-profile value is unspecified (the default), a global connection default gets consulted. If still unspecified, the DHCP option is not sent to the server. Since 1.28") + #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS N_("Array of IP addresses of DNS servers.") + #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_OPTIONS N_("Array of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties. The currently supported options are \"attempts\", \"debug\", \"edns0\", \"inet6\", \"ip6-bytestring\", \"ip6-dotint\", \"ndots\", \"no-check-names\", \"no-ip6-dotint\", \"no-reload\", \"no-tld-query\", \"rotate\", \"single-request\", \"single-request-reopen\", \"timeout\", \"trust-ad\", \"use-vc\". The \"trust-ad\" setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have \"trust-ad\" enabled.") +-#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_PRIORITY N_("DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to -50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the \"rotate\" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.") ++#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_PRIORITY N_("DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the \"rotate\" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.") + #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_SEARCH N_("Array of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting.") + #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_GATEWAY N_("The gateway associated with this configuration. This is only meaningful if \"addresses\" is also set. The gateway's main purpose is to control the next hop of the standard default route on the device. Hence, the gateway property conflicts with \"never-default\" and will be automatically dropped if the IP configuration is set to never-default. As an alternative to set the gateway, configure a static default route with /0 as prefix length.") + #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS N_("When \"method\" is set to \"auto\" and this property to TRUE, automatically configured name servers and search domains are ignored and only name servers and search domains specified in the \"dns\" and \"dns-search\" properties, if any, are used.") +@@ -257,7 +257,7 @@ + #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_TIMEOUT N_("A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for infinity.") + #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS N_("Array of IP addresses of DNS servers.") + #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_OPTIONS N_("Array of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties. The currently supported options are \"attempts\", \"debug\", \"edns0\", \"inet6\", \"ip6-bytestring\", \"ip6-dotint\", \"ndots\", \"no-check-names\", \"no-ip6-dotint\", \"no-reload\", \"no-tld-query\", \"rotate\", \"single-request\", \"single-request-reopen\", \"timeout\", \"trust-ad\", \"use-vc\". The \"trust-ad\" setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have \"trust-ad\" enabled.") +-#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_PRIORITY N_("DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to -50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the \"rotate\" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.") ++#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_PRIORITY N_("DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the \"rotate\" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.") + #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_SEARCH N_("Array of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting.") + #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_GATEWAY N_("The gateway associated with this configuration. This is only meaningful if \"addresses\" is also set. The gateway's main purpose is to control the next hop of the standard default route on the device. Hence, the gateway property conflicts with \"never-default\" and will be automatically dropped if the IP configuration is set to never-default. As an alternative to set the gateway, configure a static default route with /0 as prefix length.") + #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS N_("When \"method\" is set to \"auto\" and this property to TRUE, automatically configured name servers and search domains are ignored and only name servers and search domains specified in the \"dns\" and \"dns-search\" properties, if any, are used.") +diff --git a/libnm-core/nm-setting-ip-config.c b/libnm-core/nm-setting-ip-config.c +index e884066..7b6624d 100644 +--- a/libnm-core/nm-setting-ip-config.c ++++ b/libnm-core/nm-setting-ip-config.c +@@ -5913,7 +5913,7 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass) + * to the most negative value of all active connections profiles. + * + * Zero selects a globally configured default value. If the latter is missing +- * or zero too, it defaults to -50 for VPNs (including WireGuard) and 100 for ++ * or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for + * other connections. + * + * Note that the priority is to order DNS settings for multiple active +diff --git a/src/dns/nm-dns-manager.h b/src/dns/nm-dns-manager.h +index f91d155..3f90dc8 100644 +--- a/src/dns/nm-dns-manager.h ++++ b/src/dns/nm-dns-manager.h +@@ -22,7 +22,7 @@ typedef enum { + + enum { + NM_DNS_PRIORITY_DEFAULT_NORMAL = 100, +- NM_DNS_PRIORITY_DEFAULT_VPN = -50, ++ NM_DNS_PRIORITY_DEFAULT_VPN = 50, + }; + + struct _NMDnsConfigData; diff --git a/debian/patches/series b/debian/patches/series index b718f8ef..261bcf16 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ Force-online-state-with-unmanaged-devices.patch systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch +Revert-dns-change-default-DNS-priority-of-VPNs-to-50.patch -- cgit 1.3.0-6-gf8a5 From 9c050d4b4b3b85760abead778d68a63b1fde0a02 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 25 Nov 2020 14:59:30 +0100 Subject: Release version 1.27.91-2 to unstable --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1b5a37e0..9b72c705 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +network-manager (1.27.91-2) unstable; urgency=medium + + * Revert "dns: change default DNS priority of VPNs to -50" (Closes: #972688) + + -- Michael Biebl Wed, 25 Nov 2020 14:59:00 +0100 + network-manager (1.27.91-1) unstable; urgency=medium * New upstream version 1.27.91 (1.28 rc2) -- cgit 1.3.0-6-gf8a5 From cd77952de155d5ac488f127fb9ba8b445cece421 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 6 Dec 2020 22:31:18 +0100 Subject: New upstream version 1.28.0 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 9b72c705..2ded29e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +network-manager (1.28.0-1) UNRELEASED; urgency=medium + + * New upstream version 1.28.0 + + -- Michael Biebl Sun, 06 Dec 2020 22:31:05 +0100 + network-manager (1.27.91-2) unstable; urgency=medium * Revert "dns: change default DNS priority of VPNs to -50" (Closes: #972688) -- cgit 1.3.0-6-gf8a5 From 17562141bd3ac5da2f77f3801e765baae5acc683 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 6 Dec 2020 22:23:43 +0100 Subject: Rebase patches --- ...Force-online-state-with-unmanaged-devices.patch | 10 +- ...change-default-DNS-priority-of-VPNs-to-50.patch | 103 --------------------- debian/patches/series | 1 - 3 files changed, 5 insertions(+), 109 deletions(-) delete mode 100644 debian/patches/Revert-dns-change-default-DNS-priority-of-VPNs-to-50.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 13368ecc..f8bc3398 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/nm-manager.c b/src/nm-manager.c -index a04ca0e..ddb9094 100644 +index 46f81c7..3465be4 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -52,6 +52,8 @@ @@ -73,7 +73,7 @@ index a04ca0e..ddb9094 100644 if (new_state >= NM_STATE_CONNECTED_LOCAL && priv->connectivity_state == NM_CONNECTIVITY_FULL) { new_state = NM_STATE_CONNECTED_GLOBAL; } -@@ -6581,6 +6611,62 @@ impl_manager_set_logging(NMDBusObject * obj, +@@ -6587,6 +6617,62 @@ impl_manager_set_logging(NMDBusObject * obj, g_dbus_method_invocation_return_value(invocation, NULL); } @@ -136,7 +136,7 @@ index a04ca0e..ddb9094 100644 static void impl_manager_get_logging(NMDBusObject * obj, const NMDBusInterfaceInfoExtended *interface_info, -@@ -6910,6 +6996,9 @@ nm_manager_start(NMManager *self, GError **error) +@@ -6916,6 +7002,9 @@ nm_manager_start(NMManager *self, GError **error) nm_clear_g_source(&priv->devices_inited_id); priv->devices_inited_id = g_idle_add_full(G_PRIORITY_LOW + 10, devices_inited_cb, self, NULL); @@ -146,7 +146,7 @@ index a04ca0e..ddb9094 100644 return TRUE; } -@@ -7789,6 +7878,22 @@ nm_manager_init(NMManager *self) +@@ -7795,6 +7884,22 @@ nm_manager_init(NMManager *self) _LOGW(LOGD_CORE, "failed to monitor kernel firmware directory '%s'.", KERNEL_FIRMWARE_DIR); } @@ -169,7 +169,7 @@ index a04ca0e..ddb9094 100644 /* Update timestamps in active connections */ priv->timestamp_update_id = g_timeout_add_seconds(300, -@@ -8072,6 +8177,16 @@ dispose(GObject *object) +@@ -8078,6 +8183,16 @@ dispose(GObject *object) g_clear_object(&priv->fw_monitor); } diff --git a/debian/patches/Revert-dns-change-default-DNS-priority-of-VPNs-to-50.patch b/debian/patches/Revert-dns-change-default-DNS-priority-of-VPNs-to-50.patch deleted file mode 100644 index b632e277..00000000 --- a/debian/patches/Revert-dns-change-default-DNS-priority-of-VPNs-to-50.patch +++ /dev/null @@ -1,103 +0,0 @@ -From: Thomas Haller -Date: Fri, 20 Nov 2020 18:43:05 +0100 -Subject: Revert "dns: change default DNS priority of VPNs to -50" - -Revert this change. One problem is that none of the current GUIs -(nm-connection-editor, gnome-control-center, plasma-nm) expose the -dns-priority option. So, users tend to have their profile value set to -0. Changing the default means for them not only a change in behavior, -but its hard to fix via the GUI. - -Also, what other call DNS leaks, is Split DNS to some. Both uses make -sense, but have conflicting goals. The default cannot accommodate both -at the same time. - -Also, with split DNS enabled (dnsmasq, systemd-resolved), the concern -for DNS leaks is smaller. Imagine: - - Wi-Fi profile with ipv4.dns-priority (effectively) 100, domain "example.com". - VPN profile with ipv4.dns-priority (effectively) 50 and a default route. - -That is a common setup that one gets by default (and what probably many -users have today). In such a case with split DNS enabled, the Wi-Fi's DNS -server only sees requests for "*.example.com". So, it does not leak -everything. - -Hence, revert this change before 1.28.0 release to the earlier behavior. - -This reverts commit af13081bec8bf5cbe961df4c4577a7e4c7b14e97. - -https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/688 -(cherry picked from commit ff71bbdc4236d1e36685b07c659b80481c6ab129) -(cherry picked from commit 034db883b3cdb94cfa880c04deba0b31a938bf8a) ---- - NEWS | 5 ----- - clients/common/settings-docs.h.in | 4 ++-- - libnm-core/nm-setting-ip-config.c | 2 +- - src/dns/nm-dns-manager.h | 2 +- - 4 files changed, 4 insertions(+), 9 deletions(-) - -diff --git a/NEWS b/NEWS -index 8ebc913..03e4e8b 100644 ---- a/NEWS -+++ b/NEWS -@@ -35,11 +35,6 @@ USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE! - interfaces. - * Add a new provider for nm-cloud-setup to support automatic network - configuration on Azure. --* Change the default DNS priority for VPNs from 50 to -50. This is a -- change in behavior and means that when connecting to a VPN with the -- default route, DNS queries will never leak to local resolvers. To -- restore the old behavior, set the DNS priority of the connection to -- 50. - * The initrd generator now supports creating Infiniband connections. - * Fix running DHCPv6-PD over PPPoE. - * Fix building NetworkManager with LTO (Link Time Optimization). -diff --git a/clients/common/settings-docs.h.in b/clients/common/settings-docs.h.in -index 5b93627..58fc92e 100644 ---- a/clients/common/settings-docs.h.in -+++ b/clients/common/settings-docs.h.in -@@ -234,7 +234,7 @@ - #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DHCP_VENDOR_CLASS_IDENTIFIER N_("The Vendor Class Identifier DHCP option (60). Special characters in the data string may be escaped using C-style escapes, nevertheless this property cannot contain nul bytes. If the per-profile value is unspecified (the default), a global connection default gets consulted. If still unspecified, the DHCP option is not sent to the server. Since 1.28") - #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS N_("Array of IP addresses of DNS servers.") - #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_OPTIONS N_("Array of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties. The currently supported options are \"attempts\", \"debug\", \"edns0\", \"inet6\", \"ip6-bytestring\", \"ip6-dotint\", \"ndots\", \"no-check-names\", \"no-ip6-dotint\", \"no-reload\", \"no-tld-query\", \"rotate\", \"single-request\", \"single-request-reopen\", \"timeout\", \"trust-ad\", \"use-vc\". The \"trust-ad\" setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have \"trust-ad\" enabled.") --#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_PRIORITY N_("DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to -50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the \"rotate\" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.") -+#define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_PRIORITY N_("DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the \"rotate\" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.") - #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_DNS_SEARCH N_("Array of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting.") - #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_GATEWAY N_("The gateway associated with this configuration. This is only meaningful if \"addresses\" is also set. The gateway's main purpose is to control the next hop of the standard default route on the device. Hence, the gateway property conflicts with \"never-default\" and will be automatically dropped if the IP configuration is set to never-default. As an alternative to set the gateway, configure a static default route with /0 as prefix length.") - #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS N_("When \"method\" is set to \"auto\" and this property to TRUE, automatically configured name servers and search domains are ignored and only name servers and search domains specified in the \"dns\" and \"dns-search\" properties, if any, are used.") -@@ -257,7 +257,7 @@ - #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DHCP_TIMEOUT N_("A timeout for a DHCP transaction in seconds. If zero (the default), a globally configured default is used. If still unspecified, a device specific timeout is used (usually 45 seconds). Set to 2147483647 (MAXINT32) for infinity.") - #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS N_("Array of IP addresses of DNS servers.") - #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_OPTIONS N_("Array of DNS options as described in man 5 resolv.conf. NULL means that the options are unset and left at the default. In this case NetworkManager will use default options. This is distinct from an empty list of properties. The currently supported options are \"attempts\", \"debug\", \"edns0\", \"inet6\", \"ip6-bytestring\", \"ip6-dotint\", \"ndots\", \"no-check-names\", \"no-ip6-dotint\", \"no-reload\", \"no-tld-query\", \"rotate\", \"single-request\", \"single-request-reopen\", \"timeout\", \"trust-ad\", \"use-vc\". The \"trust-ad\" setting is only honored if the profile contributes name servers to resolv.conf, and if all contributing profiles have \"trust-ad\" enabled.") --#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_PRIORITY N_("DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to -50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the \"rotate\" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.") -+#define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_PRIORITY N_("DNS servers priority. The relative priority for DNS servers specified by this setting. A lower numerical value is better (higher priority). Negative values have the special effect of excluding other configurations with a greater numerical priority value; so in presence of at least one negative priority, only DNS servers from connections with the lowest priority value will be used. To avoid all DNS leaks, set the priority of the profile that should be used to the most negative value of all active connections profiles. Zero selects a globally configured default value. If the latter is missing or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for other connections. Note that the priority is to order DNS settings for multiple active connections. It does not disambiguate multiple DNS servers within the same connection profile. When multiple devices have configurations with the same priority, VPNs will be considered first, then devices with the best (lowest metric) default route and then all other devices. When using dns=default, servers with higher priority will be on top of resolv.conf. To prioritize a given server over another one within the same connection, just specify them in the desired order. Note that commonly the resolver tries name servers in /etc/resolv.conf in the order listed, proceeding with the next server in the list on failure. See for example the \"rotate\" option of the dns-options setting. If there are any negative DNS priorities, then only name servers from the devices with that lowest priority will be considered. When using a DNS resolver that supports Conditional Forwarding or Split DNS (with dns=dnsmasq or dns=systemd-resolved settings), each connection is used to query domains in its search list. The search domains determine which name servers to ask, and the DNS priority is used to prioritize name servers based on the domain. Queries for domains not present in any search list are routed through connections having the '~.' special wildcard domain, which is added automatically to connections with the default route (or can be added manually). When multiple connections specify the same domain, the one with the best priority (lowest numerical value) wins. If a sub domain is configured on another interface it will be accepted regardless the priority, unless parent domain on the other interface has a negative priority, which causes the sub domain to be shadowed. With Split DNS one can avoid undesired DNS leaks by properly configuring DNS priorities and the search domains, so that only name servers of the desired interface are configured.") - #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_DNS_SEARCH N_("Array of DNS search domains. Domains starting with a tilde ('~') are considered 'routing' domains and are used only to decide the interface over which a query must be forwarded; they are not used to complete unqualified host names. When using a DNS plugin that supports Conditional Forwarding or Split DNS, then the search domains specify which name servers to query. This makes the behavior different from running with plain /etc/resolv.conf. For more information see also the dns-priority setting.") - #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_GATEWAY N_("The gateway associated with this configuration. This is only meaningful if \"addresses\" is also set. The gateway's main purpose is to control the next hop of the standard default route on the device. Hence, the gateway property conflicts with \"never-default\" and will be automatically dropped if the IP configuration is set to never-default. As an alternative to set the gateway, configure a static default route with /0 as prefix length.") - #define DESCRIBE_DOC_NM_SETTING_IP6_CONFIG_IGNORE_AUTO_DNS N_("When \"method\" is set to \"auto\" and this property to TRUE, automatically configured name servers and search domains are ignored and only name servers and search domains specified in the \"dns\" and \"dns-search\" properties, if any, are used.") -diff --git a/libnm-core/nm-setting-ip-config.c b/libnm-core/nm-setting-ip-config.c -index e884066..7b6624d 100644 ---- a/libnm-core/nm-setting-ip-config.c -+++ b/libnm-core/nm-setting-ip-config.c -@@ -5913,7 +5913,7 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass) - * to the most negative value of all active connections profiles. - * - * Zero selects a globally configured default value. If the latter is missing -- * or zero too, it defaults to -50 for VPNs (including WireGuard) and 100 for -+ * or zero too, it defaults to 50 for VPNs (including WireGuard) and 100 for - * other connections. - * - * Note that the priority is to order DNS settings for multiple active -diff --git a/src/dns/nm-dns-manager.h b/src/dns/nm-dns-manager.h -index f91d155..3f90dc8 100644 ---- a/src/dns/nm-dns-manager.h -+++ b/src/dns/nm-dns-manager.h -@@ -22,7 +22,7 @@ typedef enum { - - enum { - NM_DNS_PRIORITY_DEFAULT_NORMAL = 100, -- NM_DNS_PRIORITY_DEFAULT_VPN = -50, -+ NM_DNS_PRIORITY_DEFAULT_VPN = 50, - }; - - struct _NMDnsConfigData; diff --git a/debian/patches/series b/debian/patches/series index 261bcf16..b718f8ef 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,2 @@ Force-online-state-with-unmanaged-devices.patch systemd-basic-missing_syscall-fix-syscall-numbers-for-x32.patch -Revert-dns-change-default-DNS-priority-of-VPNs-to-50.patch -- cgit 1.3.0-6-gf8a5 From d6169291b6c4c50db8361975da30cc120d165470 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 6 Dec 2020 22:48:48 +0100 Subject: Release version 1.28.0-1 to unstable --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 2ded29e6..370d5d01 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ -network-manager (1.28.0-1) UNRELEASED; urgency=medium +network-manager (1.28.0-1) unstable; urgency=medium * New upstream version 1.28.0 + * Rebase patches - -- Michael Biebl Sun, 06 Dec 2020 22:31:05 +0100 + -- Michael Biebl Sun, 06 Dec 2020 22:48:28 +0100 network-manager (1.27.91-2) unstable; urgency=medium -- cgit 1.3.0-6-gf8a5 From 051c2c4941f89f892cd00e37921ff2a728d8f7da Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 31 Dec 2020 10:14:16 +0100 Subject: Demote libpam-systemd to Recommends This allows users to use and experiment with other init systems. Such a setup is neither tested nor fully supported and users need to be aware that some functionality might be broken. Closes: #921012 --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 377f8779..fe2d4ed4 100644 --- a/debian/control +++ b/debian/control @@ -55,13 +55,13 @@ Depends: ${shlibs:Depends}, dbus, udev, adduser, - libpam-systemd, policykit-1 Recommends: ppp, dnsmasq-base, iptables, modemmanager, crda, + libpam-systemd, Suggests: libteam-utils, isc-dhcp-client, Breaks: ${misc:Breaks} -- cgit 1.3.0-6-gf8a5 From d5d4fb6a1e20b85c70ac1bf5354a35c508c73dc6 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 31 Dec 2020 10:37:52 +0100 Subject: Recommend wireless-regdb instead of crda CRDA is no longer needed as of Linux kernel v4.15. Closes: #973241 --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index fe2d4ed4..d677680d 100644 --- a/debian/control +++ b/debian/control @@ -60,7 +60,7 @@ Recommends: ppp, dnsmasq-base, iptables, modemmanager, - crda, + wireless-regdb, libpam-systemd, Suggests: libteam-utils, isc-dhcp-client, -- cgit 1.3.0-6-gf8a5 From 65303ae701dee3d3b5f7661e8b31808c5a48c3e7 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 31 Dec 2020 10:40:34 +0100 Subject: Bump Standards-Version to 4.5.1 --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index d677680d..b50a848f 100644 --- a/debian/control +++ b/debian/control @@ -39,7 +39,7 @@ Build-Depends: debhelper-compat (= 13), valac (>= 0.17.1.24), dbus , python3-dbus -Standards-Version: 4.5.0 +Standards-Version: 4.5.1 Rules-Requires-Root: no Vcs-Git: https://salsa.debian.org/utopia-team/network-manager.git Vcs-Browser: https://salsa.debian.org/utopia-team/network-manager -- cgit 1.3.0-6-gf8a5 From f54032b30e1ddd84f10a339e0caf493772e049a7 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 31 Dec 2020 21:39:27 +0100 Subject: Release version 1.28.0-2 to unstable --- debian/changelog | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 370d5d01..c6c62790 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +network-manager (1.28.0-2) unstable; urgency=medium + + * Demote libpam-systemd to Recommends. + This allows users to use and experiment with other init systems. Such a + setup is neither tested nor fully supported and users need to be aware + that some functionality might be broken. (Closes: #921012) + * Recommend wireless-regdb instead of crda. + CRDA is no longer needed as of Linux kernel v4.15. (Closes: #973241) + * Bump Standards-Version to 4.5.1 + + -- Michael Biebl Thu, 31 Dec 2020 21:38:43 +0100 + network-manager (1.28.0-1) unstable; urgency=medium * New upstream version 1.28.0 -- cgit 1.3.0-6-gf8a5