From 61ea65bd230e95b1d7a8a35064e7b1abf9c8c8db Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 5 Nov 2018 16:02:16 +0100 Subject: cli: wait for all wifi scans to finish before displaying the result Otherwise devices are displayed in an inconsistent order. Replaces debian/patches/Ignore-client-tests-failures.patch. --- debian/patches/Ignore-client-tests-failures.patch | 26 --- debian/patches/cli-fix-memory-leaks.patch | 37 ++++ .../patches/cli-tests-fix-output-on-failure.patch | 25 +++ ...-wifi-scans-to-finish-before-displaying-t.patch | 219 +++++++++++++++++++++ debian/patches/series | 5 +- ...ld-LastScan-wifi-value-in-test-networkman.patch | 37 ++++ 6 files changed, 322 insertions(+), 27 deletions(-) delete mode 100644 debian/patches/Ignore-client-tests-failures.patch create mode 100644 debian/patches/cli-fix-memory-leaks.patch create mode 100644 debian/patches/cli-tests-fix-output-on-failure.patch create mode 100644 debian/patches/cli-wait-for-all-wifi-scans-to-finish-before-displaying-t.patch create mode 100644 debian/patches/tests-simulate-old-LastScan-wifi-value-in-test-networkman.patch (limited to 'debian') diff --git a/debian/patches/Ignore-client-tests-failures.patch b/debian/patches/Ignore-client-tests-failures.patch deleted file mode 100644 index a56af7d7..00000000 --- a/debian/patches/Ignore-client-tests-failures.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Michael Biebl -Date: Thu, 25 Oct 2018 00:09:31 +0200 -Subject: Ignore client/tests failures - -check-local-clients-tests-test-client appears to be flaky and prone to -fail on slower architectures. Ignore failures of this test until this -has been properly investigated. - -https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/39 ---- - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index 204f1a0..9181ad1 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -4056,7 +4056,7 @@ check-local-clients-tests-test-client: clients/cli/nmcli clients/tests/test-clie - "$(PYTHON)" \ - $(srcdir)/clients/tests/test-client.py -v &> "$(builddir)/clients/tests/test-client.log" && r=ok; \ - cat "$(builddir)/clients/tests/test-client.log"; \ -- test "$$r" == ok -+ true - - check_local += check-local-clients-tests-test-client - diff --git a/debian/patches/cli-fix-memory-leaks.patch b/debian/patches/cli-fix-memory-leaks.patch new file mode 100644 index 00000000..457a7f85 --- /dev/null +++ b/debian/patches/cli-fix-memory-leaks.patch @@ -0,0 +1,37 @@ +From: Beniamino Galvani +Date: Wed, 31 Oct 2018 10:10:10 +0100 +Subject: cli: fix memory leaks + +(cherry picked from commit a985efaf934cedd37a69f94cd35990d7e2c43f0b) +(cherry picked from commit e22602096fe60fd73586bf041863b63aad84bbee) +--- + clients/cli/devices.c | 2 +- + clients/cli/utils.c | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/clients/cli/devices.c b/clients/cli/devices.c +index 38e24e7..b7ba50f 100644 +--- a/clients/cli/devices.c ++++ b/clients/cli/devices.c +@@ -2795,7 +2795,7 @@ show_access_point_info (NMDeviceWifi *wifi, NmCli *nmc, NmcOutputData *out) + + aps = sort_access_points (nm_device_wifi_get_access_points (wifi)); + g_ptr_array_foreach (aps, fill_output_access_point, &info); +- g_ptr_array_free (aps, FALSE); ++ g_ptr_array_free (aps, TRUE); + } + + print_data_prepare_width (out->output_data); +diff --git a/clients/cli/utils.c b/clients/cli/utils.c +index e21c108..feb6722 100644 +--- a/clients/cli/utils.c ++++ b/clients/cli/utils.c +@@ -919,6 +919,8 @@ nmc_empty_output_fields (NmcOutputData *output_data) + /* Empty output_data array */ + if (output_data->output_data->len > 0) + g_ptr_array_remove_range (output_data->output_data, 0, output_data->output_data->len); ++ ++ g_ptr_array_unref (output_data->output_data); + } + + /*****************************************************************************/ diff --git a/debian/patches/cli-tests-fix-output-on-failure.patch b/debian/patches/cli-tests-fix-output-on-failure.patch new file mode 100644 index 00000000..4a213a92 --- /dev/null +++ b/debian/patches/cli-tests-fix-output-on-failure.patch @@ -0,0 +1,25 @@ +From: Beniamino Galvani +Date: Wed, 31 Oct 2018 11:29:26 +0100 +Subject: cli/tests: fix output on failure + +(cherry picked from commit 5665f67bae25ee9f96e057c2a993b8cf69cbc127) +(cherry picked from commit d1afd1c4206d3720de7776ed93ae61c48a7cc71d) +--- + clients/tests/test-client.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/clients/tests/test-client.py b/clients/tests/test-client.py +index e8f1f7f..d92d499 100755 +--- a/clients/tests/test-client.py ++++ b/clients/tests/test-client.py +@@ -744,8 +744,8 @@ class TestNmcli(NmTestBase): + skip_test_for_l10n_diff.append(n['test_name']) + continue + print("\n\n\nThe file '%s' does not have the expected content:" % (filename)) +- print("ACTUAL OUTPUT:\n[[%s]]\n" % (results_expect[i])) +- print("EXPECT OUTPUT:\n[[%s]]\n" % (n['content'])) ++ print("ACTUAL OUTPUT:\n[[%s]]\n" % (n['content'])) ++ print("EXPECT OUTPUT:\n[[%s]]\n" % (results_expect[i])) + print("Let the test write the file by rerunning with NM_TEST_REGENERATE=1") + print("See howto in %s for details.\n" % (PathConfiguration.canonical_script_filename())) + self.fail("Unexpected output of command, expected %s. Rerun test with NM_TEST_REGENERATE=1 to regenerate files" % (filename)) diff --git a/debian/patches/cli-wait-for-all-wifi-scans-to-finish-before-displaying-t.patch b/debian/patches/cli-wait-for-all-wifi-scans-to-finish-before-displaying-t.patch new file mode 100644 index 00000000..aaf4f28b --- /dev/null +++ b/debian/patches/cli-wait-for-all-wifi-scans-to-finish-before-displaying-t.patch @@ -0,0 +1,219 @@ +From: Beniamino Galvani +Date: Wed, 31 Oct 2018 10:00:22 +0100 +Subject: cli: wait for all wifi scans to finish before displaying the result + +Otherwise devices are displayed in a inconsistent order. + +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/39 +(cherry picked from commit c0138cdb35b51bf268c361a2dc7f4c4f6f36ef52) +(cherry picked from commit c1bf574ea5b191bf081dbb31eee7f709e0b654a1) +--- + clients/cli/devices.c | 140 ++++++++++++++++++++++++++++---------------------- + 1 file changed, 78 insertions(+), 62 deletions(-) + +diff --git a/clients/cli/devices.c b/clients/cli/devices.c +index 029ca67..38e24e7 100644 +--- a/clients/cli/devices.c ++++ b/clients/cli/devices.c +@@ -2870,28 +2870,38 @@ wifi_print_aps (NMDeviceWifi *wifi, + + typedef struct { + NmCli *nmc; +- NMDeviceWifi *wifi; +- const NMMetaAbstractInfo *const*tmpl; +- ++ NMDevice **devices; ++ const NMMetaAbstractInfo *const *tmpl; + const char *bssid_user; ++ GArray *out_indices; ++} ScanInfo; ++ ++typedef struct { ++ ScanInfo *scan_info; ++ NMDeviceWifi *wifi; + gulong last_scan_id; + guint timeout_id; + GCancellable *scan_cancellable; +- GArray *out_indices; + } WifiListData; + + static void + wifi_list_finish (WifiListData *data) + { +- NmCli *nmc = data->nmc; +- +- wifi_print_aps (data->wifi, data->nmc, data->out_indices, +- data->tmpl, data->bssid_user); ++ ScanInfo *info = data->scan_info; ++ NmCli *nmc = info->nmc; ++ guint i; + +- if (--nmc->should_wait == 0) { ++ if (--info->nmc->should_wait == 0) { ++ for (i = 0; info->devices[i]; i++) { ++ wifi_print_aps (NM_DEVICE_WIFI (info->devices[i]), ++ info->nmc, ++ info->out_indices, ++ info->tmpl, ++ info->bssid_user); ++ } + if (nmc->return_value == NMC_RESULT_ERROR_NOT_FOUND) { + g_string_printf (nmc->return_text, _("Error: Access point with bssid '%s' not found."), +- data->bssid_user); ++ data->scan_info->bssid_user); + } + g_main_loop_quit (loop); + } +@@ -2899,9 +2909,15 @@ wifi_list_finish (WifiListData *data) + g_signal_handler_disconnect (data->wifi, data->last_scan_id); + nm_clear_g_source (&data->timeout_id); + nm_clear_g_cancellable (&data->scan_cancellable); +- g_array_unref (data->out_indices); +- g_object_unref (data->wifi); + g_slice_free (WifiListData, data); ++ ++ if (info->nmc->should_wait == 0) { ++ for (i = 0; info->devices[i]; i++) ++ g_object_unref (info->devices[i]); ++ g_free (info->devices); ++ g_array_unref (info->out_indices); ++ g_free (info); ++ } + } + + static void +@@ -2945,49 +2961,6 @@ wifi_list_scan_timeout (gpointer user_data) + return G_SOURCE_REMOVE; + } + +-static void +-wifi_list_aps (NMDeviceWifi *wifi, +- NmCli *nmc, +- GArray *out_indices, +- const NMMetaAbstractInfo *const*tmpl, +- const char *bssid_user, +- gint64 rescan_cutoff) +-{ +- gboolean needs_rescan; +- WifiListData *data; +- +- needs_rescan = rescan_cutoff < 0 || (rescan_cutoff > 0 && nm_device_wifi_get_last_scan (wifi) < rescan_cutoff); +- +- /* FIXME: nmcli should either +- * - don't request any new scan for any device and print the full AP list right +- * away. +- * - or, when requesting a scan on one or more devices, don't print the result +- * before all requests complete. +- * +- * Otherwise: +- * - the printed output is not self consistent. E.g. it will print the result +- * on one device at a certain time, while printing the result for another +- * device at a later point in time. +- * - the order in which we print the AP list per-device, is unstable. */ +- if (needs_rescan) { +- data = g_slice_new0 (WifiListData); +- data->nmc = nmc; +- data->wifi = g_object_ref (wifi); +- data->tmpl = tmpl; +- data->out_indices = g_array_ref (out_indices);; +- data->bssid_user = bssid_user; +- data->last_scan_id = g_signal_connect (wifi, "notify::" NM_DEVICE_WIFI_LAST_SCAN, +- G_CALLBACK (wifi_last_scan_updated), data); +- data->scan_cancellable = g_cancellable_new (); +- data->timeout_id = g_timeout_add_seconds (15, wifi_list_scan_timeout, data); +- nm_device_wifi_request_scan_async (wifi, data->scan_cancellable, wifi_list_rescan_cb, data); +- +- nmc->should_wait++; +- } else { +- wifi_print_aps (wifi, nmc, out_indices, tmpl, bssid_user); +- } +-} +- + static void + complete_aps (NMDevice **devices, const char *ifname, + const char *bssid_prefix, const char *ssid_prefix) +@@ -3017,12 +2990,15 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv) + const char *bssid_user = NULL; + const char *rescan = NULL; + gs_free NMDevice **devices = NULL; +- guint i; + const char *fields_str = NULL; + const NMMetaAbstractInfo *const*tmpl; + gs_unref_array GArray *out_indices = NULL; + int option; + guint64 rescan_cutoff; ++ NMDeviceWifi *wifi; ++ ScanInfo *scan_info = NULL; ++ WifiListData *data; ++ guint i, j; + + devices = nmc_get_devices_sorted (nmc->client); + +@@ -3110,7 +3086,8 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv) + } + + if (NM_IS_DEVICE_WIFI (device)) { +- wifi_list_aps (NM_DEVICE_WIFI (device), nmc, out_indices, tmpl, bssid_user, rescan_cutoff); ++ devices[0] = device; ++ devices[1] = NULL; + } else { + if ( nm_device_get_device_type (device) == NM_DEVICE_TYPE_GENERIC + && g_strcmp0 (nm_device_get_type_description (device), "wifi") == 0) { +@@ -3124,13 +3101,52 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv) + } + return NMC_RESULT_ERROR_UNKNOWN; + } ++ } ++ ++ /* Filter out non-wifi devices */ ++ for (i = 0, j = 0; devices[i]; i++) { ++ if (NM_IS_DEVICE_WIFI (devices[i])) ++ devices[j++] = devices[i]; ++ } ++ devices[j] = NULL; ++ ++ /* Start a new scan for devices that need it */ ++ for (i = 0; devices[i]; i++) { ++ wifi = (NMDeviceWifi *) devices[i]; ++ g_object_ref (wifi); ++ ++ if ( rescan_cutoff == 0 ++ || (rescan_cutoff > 0 && nm_device_wifi_get_last_scan (wifi) >= rescan_cutoff)) ++ continue; ++ ++ if (!scan_info) { ++ scan_info = g_new0 (ScanInfo, 1); ++ scan_info->out_indices = g_array_ref (out_indices); ++ scan_info->tmpl = tmpl; ++ scan_info->bssid_user = bssid_user; ++ scan_info->nmc = nmc; ++ } ++ ++ nmc->should_wait++; ++ data = g_slice_new0 (WifiListData); ++ data->wifi = wifi; ++ data->scan_info = scan_info; ++ data->last_scan_id = g_signal_connect (wifi, "notify::" NM_DEVICE_WIFI_LAST_SCAN, ++ G_CALLBACK (wifi_last_scan_updated), data); ++ data->scan_cancellable = g_cancellable_new (); ++ data->timeout_id = g_timeout_add_seconds (15, wifi_list_scan_timeout, data); ++ nm_device_wifi_request_scan_async (wifi, data->scan_cancellable, wifi_list_rescan_cb, data); ++ } ++ ++ if (scan_info) { ++ scan_info->devices = g_steal_pointer (&devices); + } else { ++ /* Print results right away if no scan is pending */ + for (i = 0; devices[i]; i++) { +- NMDevice *dev = devices[i]; +- +- if (NM_IS_DEVICE_WIFI (dev)) { +- wifi_list_aps (NM_DEVICE_WIFI (dev), nmc, out_indices, tmpl, bssid_user, rescan_cutoff); +- } ++ wifi_print_aps (NM_DEVICE_WIFI (devices[i]), ++ nmc, out_indices, ++ tmpl, bssid_user); ++ g_object_unref (devices[i]); + } + } + diff --git a/debian/patches/series b/debian/patches/series index 5be1814f..a5646381 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,10 +1,13 @@ Force-online-state-with-unmanaged-devices.patch Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch Don-t-make-NetworkManager-D-Bus-activatable.patch -Ignore-client-tests-failures.patch sd-dhcp-lease-fix-memleaks.patch dhcp6-fix-buffer-size-checking.patch sd-dhcp6-fix-argument-and-error-handling-of-dhcp6_option_.patch sd-dhcp6-make-dhcp6_option_parse_domainname-not-store-emp.patch sd-dhcp-remove-unreachable-route-after-rebinding-return-N.patch dhcp6-make-sure-we-have-enough-space-for-the-DHCP6-option.patch +cli-wait-for-all-wifi-scans-to-finish-before-displaying-t.patch +cli-fix-memory-leaks.patch +cli-tests-fix-output-on-failure.patch +tests-simulate-old-LastScan-wifi-value-in-test-networkman.patch diff --git a/debian/patches/tests-simulate-old-LastScan-wifi-value-in-test-networkman.patch b/debian/patches/tests-simulate-old-LastScan-wifi-value-in-test-networkman.patch new file mode 100644 index 00000000..31ec7ee6 --- /dev/null +++ b/debian/patches/tests-simulate-old-LastScan-wifi-value-in-test-networkman.patch @@ -0,0 +1,37 @@ +From: Beniamino Galvani +Date: Fri, 2 Nov 2018 13:49:25 +0100 +Subject: tests: simulate old LastScan wifi value in + test-networkmanager-service.py + +In this way clients will randomly find that the AP list is older than +30 seconds and they will issue a new scan. + +(cherry picked from commit 5ba301f4eb652a208a500a39d59dadf427a64590) +(cherry picked from commit 9b0735f6fd9d69b486d54a7ed99b595c111e54f7) +--- + tools/test-networkmanager-service.py | 12 ++---------- + 1 file changed, 2 insertions(+), 10 deletions(-) + +diff --git a/tools/test-networkmanager-service.py b/tools/test-networkmanager-service.py +index 8a37fb1..9aa44a9 100755 +--- a/tools/test-networkmanager-service.py ++++ b/tools/test-networkmanager-service.py +@@ -916,16 +916,8 @@ class WifiDevice(Device): + self.aps = [] + self.scan_cb_id = None + +- # Note: we would like to simulate how nmcli calls RequestScan() and we could +- # do so by using an older timestamp. However, that makes the client tests +- # racy, because if a bunch of nmcli instances run in parallel against this +- # service, earlier instances will issue a RequestScan(), while later instances +- # won't do that (because the LastScan timestamp is already updated). That means, +- # the later instances will print the scan result immediately, and in another sort +- # order. That should be fixed, by nmcli not starting to print anything, before +- # all RequestScan() requests complete, and thus, always print a consistent list +- # of results. +- ts = NM.utils_get_timestamp_msec() ++ # Use a randomly older timestamp to trigger RequestScan() from the client ++ ts = max(0, NM.utils_get_timestamp_msec() - Util.random_int(self.path, 20000, 40000)) + + props = { + PRP_WIFI_HW_ADDRESS: mac, -- cgit 1.3.0-6-gf8a5 From efc618fca3ff150f8188ad1d3a87049dd42a5727 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Mon, 5 Nov 2018 16:06:01 +0100 Subject: Release version 1.14.4-3 to unstable --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 11ebacf2..cbf982d5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +network-manager (1.14.4-3) unstable; urgency=medium + + * cli: wait for all wifi scans to finish before displaying the result. + Otherwise devices are displayed in an inconsistent order. + Replaces debian/patches/Ignore-client-tests-failures.patch. + + -- Michael Biebl Mon, 05 Nov 2018 16:05:51 +0100 + network-manager (1.14.4-2) unstable; urgency=high * dhcp6: Make sure we have enough space for the DHCP6 option header. -- cgit 1.3.0-6-gf8a5 From 677cd79028d990e76cd3b9505c4a4b59b934dbf6 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 27 Nov 2018 01:22:09 +0100 Subject: Move D-Bus policy files to /usr/share/dbus-1/system.d/ This is supported since dbus 1.9.18. --- debian/network-manager.install | 4 ++-- debian/rules | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/network-manager.install b/debian/network-manager.install index bb751b47..0f1e82ae 100644 --- a/debian/network-manager.install +++ b/debian/network-manager.install @@ -14,10 +14,10 @@ usr/lib/pppd/*/*.so usr/share/locale/ usr/share/man/ usr/share/dbus-1/system-services/ +usr/share/dbus-1/system.d/org.freedesktop.NetworkManager.conf +usr/share/dbus-1/system.d/nm-dispatcher.conf usr/share/polkit-1/ usr/share/bash-completion/ -etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf -etc/dbus-1/system.d/nm-dispatcher.conf etc/NetworkManager/dispatcher.d/ lib/udev/rules.d/*.rules lib/systemd/system/NetworkManager.service diff --git a/debian/rules b/debian/rules index 023d1884..dc1f974d 100755 --- a/debian/rules +++ b/debian/rules @@ -28,6 +28,7 @@ override_dh_auto_configure: --with-dnssec-trigger=/usr/lib/dnssec-trigger/dnssec-trigger-script \ --with-systemdsystemunitdir=/lib/systemd/system \ --with-udev-dir=/lib/udev \ + --with-dbus-sys-dir=/usr/share/dbus-1/system.d \ --with-crypto=gnutls \ --with-session-tracking=systemd \ --with-suspend-resume=systemd \ -- cgit 1.3.0-6-gf8a5 From 179df1a8ab7df0663d8178883373c31b59cfbf06 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 27 Nov 2018 01:35:15 +0100 Subject: Remove obsolete D-Bus policy conffiles on upgrades --- debian/network-manager.maintscript | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/network-manager.maintscript b/debian/network-manager.maintscript index c6b7a809..02266a64 100644 --- a/debian/network-manager.maintscript +++ b/debian/network-manager.maintscript @@ -1,2 +1,4 @@ rm_conffile /etc/dbus-1/system.d/nm-avahi-autoipd.conf 1.1.90-2~ mv_conffile /etc/NetworkManager/dispatcher.d/01ifupdown /etc/NetworkManager/dispatcher.d/01-ifupdown 1.8.0-5~ +rm_conffile /etc/dbus-1/system.d/nm-dispatcher.conf 1.14.4-4~ +rm_conffile /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf 1.14.4-4~ -- cgit 1.3.0-6-gf8a5 From 1b878e595ff7be634a4800ca6cc506046e49548e Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 27 Nov 2018 01:36:30 +0100 Subject: Release version 1.14.4-4 to unstable --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index cbf982d5..3e505a8e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +network-manager (1.14.4-4) unstable; urgency=medium + + * Move D-Bus policy files to /usr/share/dbus-1/system.d/ + * Remove obsolete D-Bus policy conffiles on upgrades + + -- Michael Biebl Tue, 27 Nov 2018 01:35:50 +0100 + network-manager (1.14.4-3) unstable; urgency=medium * cli: wait for all wifi scans to finish before displaying the result. -- cgit 1.3.0-6-gf8a5 From 12aead6b161a3312673ac62686af0350061c0666 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 4 Jan 2019 23:30:05 +0100 Subject: Use debhelper-compat (= 12) Build-Depends and drop debian/compat --- debian/compat | 1 - debian/control | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 debian/compat (limited to 'debian') diff --git a/debian/compat b/debian/compat deleted file mode 100644 index 48082f72..00000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/debian/control b/debian/control index 27fa8d2b..fc282213 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Maintainer: Utopia Maintenance Team , Sjoerd Simons , Aron Xu -Build-Depends: debhelper (>= 11.4~), +Build-Depends: debhelper-compat (= 12), automake (>= 1.12), dpkg-dev (>= 1.17.14), pkg-config, -- cgit 1.3.0-6-gf8a5 From 841d38f99b5e3444494902a7817fed0e8d1ab662 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 26 Feb 2019 19:02:48 +0100 Subject: New upstream version 1.14.6 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 3e505a8e..25589d9e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +network-manager (1.14.6-1) UNRELEASED; urgency=medium + + * New upstream version 1.14.6 + * Use debhelper-compat (= 12) Build-Depends and drop debian/compat + + -- Michael Biebl Tue, 26 Feb 2019 19:02:37 +0100 + network-manager (1.14.4-4) unstable; urgency=medium * Move D-Bus policy files to /usr/share/dbus-1/system.d/ -- cgit 1.3.0-6-gf8a5 From 9739acb138159aa4df6d6fde42e71ae35f9f4be3 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 26 Feb 2019 19:03:46 +0100 Subject: Rebase patches --- ...n-t-make-NetworkManager-D-Bus-activatable.patch | 4 +- ...Force-online-state-with-unmanaged-devices.patch | 10 +- debian/patches/cli-fix-memory-leaks.patch | 37 ---- .../patches/cli-tests-fix-output-on-failure.patch | 25 --- ...-wifi-scans-to-finish-before-displaying-t.patch | 219 --------------------- .../patches/dhcp6-fix-buffer-size-checking.patch | 25 --- ...we-have-enough-space-for-the-DHCP6-option.patch | 31 --- debian/patches/sd-dhcp-lease-fix-memleaks.patch | 23 --- ...nreachable-route-after-rebinding-return-N.patch | 24 --- ...ument-and-error-handling-of-dhcp6_option_.patch | 60 ------ ...cp6_option_parse_domainname-not-store-emp.patch | 111 ----------- debian/patches/series | 10 - ...ld-LastScan-wifi-value-in-test-networkman.patch | 37 ---- 13 files changed, 7 insertions(+), 609 deletions(-) delete mode 100644 debian/patches/cli-fix-memory-leaks.patch delete mode 100644 debian/patches/cli-tests-fix-output-on-failure.patch delete mode 100644 debian/patches/cli-wait-for-all-wifi-scans-to-finish-before-displaying-t.patch delete mode 100644 debian/patches/dhcp6-fix-buffer-size-checking.patch delete mode 100644 debian/patches/dhcp6-make-sure-we-have-enough-space-for-the-DHCP6-option.patch delete mode 100644 debian/patches/sd-dhcp-lease-fix-memleaks.patch delete mode 100644 debian/patches/sd-dhcp-remove-unreachable-route-after-rebinding-return-N.patch delete mode 100644 debian/patches/sd-dhcp6-fix-argument-and-error-handling-of-dhcp6_option_.patch delete mode 100644 debian/patches/sd-dhcp6-make-dhcp6_option_parse_domainname-not-store-emp.patch delete mode 100644 debian/patches/tests-simulate-old-LastScan-wifi-value-in-test-networkman.patch (limited to 'debian') diff --git a/debian/patches/Don-t-make-NetworkManager-D-Bus-activatable.patch b/debian/patches/Don-t-make-NetworkManager-D-Bus-activatable.patch index 636865a4..99543a19 100644 --- a/debian/patches/Don-t-make-NetworkManager-D-Bus-activatable.patch +++ b/debian/patches/Don-t-make-NetworkManager-D-Bus-activatable.patch @@ -10,10 +10,10 @@ to be autostarted by a client request. 2 files changed, 6 deletions(-) diff --git a/Makefile.am b/Makefile.am -index 1e100f6..204f1a0 100644 +index e1b442e..8428816 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -4110,11 +4110,6 @@ endif +@@ -4105,11 +4105,6 @@ endif data/NetworkManager-dispatcher.service: $(srcdir)/data/NetworkManager-dispatcher.service.in $(AM_V_GEN) $(data_edit) $< >$@ diff --git a/debian/patches/Force-online-state-with-unmanaged-devices.patch b/debian/patches/Force-online-state-with-unmanaged-devices.patch index ae96f968..80d3158a 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 7598995..1439c47 100644 +index 3ddc3b9..ada30d9 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -62,6 +62,8 @@ @@ -73,7 +73,7 @@ index 7598995..1439c47 100644 if ( new_state >= NM_STATE_CONNECTED_LOCAL && priv->connectivity_state == NM_CONNECTIVITY_FULL) { new_state = NM_STATE_CONNECTED_GLOBAL; -@@ -6209,6 +6239,62 @@ impl_manager_check_connectivity (NMDBusObject *obj, +@@ -6217,6 +6247,62 @@ impl_manager_check_connectivity (NMDBusObject *obj, nm_auth_chain_add_call (chain, NM_AUTH_PERMISSION_NETWORK_CONTROL, TRUE); } @@ -136,7 +136,7 @@ index 7598995..1439c47 100644 static void start_factory (NMDeviceFactory *factory, gpointer user_data) { -@@ -6377,6 +6463,9 @@ nm_manager_start (NMManager *self, GError **error) +@@ -6385,6 +6471,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 7598995..1439c47 100644 return TRUE; } -@@ -7231,6 +7320,22 @@ nm_manager_init (NMManager *self) +@@ -7239,6 +7328,22 @@ nm_manager_init (NMManager *self) KERNEL_FIRMWARE_DIR); } @@ -169,7 +169,7 @@ index 7598995..1439c47 100644 /* Update timestamps in active connections */ priv->timestamp_update_id = g_timeout_add_seconds (300, (GSourceFunc) periodic_update_active_connection_timestamps, self); -@@ -7506,6 +7611,16 @@ dispose (GObject *object) +@@ -7514,6 +7619,16 @@ dispose (GObject *object) g_clear_object (&priv->fw_monitor); } diff --git a/debian/patches/cli-fix-memory-leaks.patch b/debian/patches/cli-fix-memory-leaks.patch deleted file mode 100644 index 457a7f85..00000000 --- a/debian/patches/cli-fix-memory-leaks.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Beniamino Galvani -Date: Wed, 31 Oct 2018 10:10:10 +0100 -Subject: cli: fix memory leaks - -(cherry picked from commit a985efaf934cedd37a69f94cd35990d7e2c43f0b) -(cherry picked from commit e22602096fe60fd73586bf041863b63aad84bbee) ---- - clients/cli/devices.c | 2 +- - clients/cli/utils.c | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/clients/cli/devices.c b/clients/cli/devices.c -index 38e24e7..b7ba50f 100644 ---- a/clients/cli/devices.c -+++ b/clients/cli/devices.c -@@ -2795,7 +2795,7 @@ show_access_point_info (NMDeviceWifi *wifi, NmCli *nmc, NmcOutputData *out) - - aps = sort_access_points (nm_device_wifi_get_access_points (wifi)); - g_ptr_array_foreach (aps, fill_output_access_point, &info); -- g_ptr_array_free (aps, FALSE); -+ g_ptr_array_free (aps, TRUE); - } - - print_data_prepare_width (out->output_data); -diff --git a/clients/cli/utils.c b/clients/cli/utils.c -index e21c108..feb6722 100644 ---- a/clients/cli/utils.c -+++ b/clients/cli/utils.c -@@ -919,6 +919,8 @@ nmc_empty_output_fields (NmcOutputData *output_data) - /* Empty output_data array */ - if (output_data->output_data->len > 0) - g_ptr_array_remove_range (output_data->output_data, 0, output_data->output_data->len); -+ -+ g_ptr_array_unref (output_data->output_data); - } - - /*****************************************************************************/ diff --git a/debian/patches/cli-tests-fix-output-on-failure.patch b/debian/patches/cli-tests-fix-output-on-failure.patch deleted file mode 100644 index 4a213a92..00000000 --- a/debian/patches/cli-tests-fix-output-on-failure.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Beniamino Galvani -Date: Wed, 31 Oct 2018 11:29:26 +0100 -Subject: cli/tests: fix output on failure - -(cherry picked from commit 5665f67bae25ee9f96e057c2a993b8cf69cbc127) -(cherry picked from commit d1afd1c4206d3720de7776ed93ae61c48a7cc71d) ---- - clients/tests/test-client.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/clients/tests/test-client.py b/clients/tests/test-client.py -index e8f1f7f..d92d499 100755 ---- a/clients/tests/test-client.py -+++ b/clients/tests/test-client.py -@@ -744,8 +744,8 @@ class TestNmcli(NmTestBase): - skip_test_for_l10n_diff.append(n['test_name']) - continue - print("\n\n\nThe file '%s' does not have the expected content:" % (filename)) -- print("ACTUAL OUTPUT:\n[[%s]]\n" % (results_expect[i])) -- print("EXPECT OUTPUT:\n[[%s]]\n" % (n['content'])) -+ print("ACTUAL OUTPUT:\n[[%s]]\n" % (n['content'])) -+ print("EXPECT OUTPUT:\n[[%s]]\n" % (results_expect[i])) - print("Let the test write the file by rerunning with NM_TEST_REGENERATE=1") - print("See howto in %s for details.\n" % (PathConfiguration.canonical_script_filename())) - self.fail("Unexpected output of command, expected %s. Rerun test with NM_TEST_REGENERATE=1 to regenerate files" % (filename)) diff --git a/debian/patches/cli-wait-for-all-wifi-scans-to-finish-before-displaying-t.patch b/debian/patches/cli-wait-for-all-wifi-scans-to-finish-before-displaying-t.patch deleted file mode 100644 index aaf4f28b..00000000 --- a/debian/patches/cli-wait-for-all-wifi-scans-to-finish-before-displaying-t.patch +++ /dev/null @@ -1,219 +0,0 @@ -From: Beniamino Galvani -Date: Wed, 31 Oct 2018 10:00:22 +0100 -Subject: cli: wait for all wifi scans to finish before displaying the result - -Otherwise devices are displayed in a inconsistent order. - -https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/39 -(cherry picked from commit c0138cdb35b51bf268c361a2dc7f4c4f6f36ef52) -(cherry picked from commit c1bf574ea5b191bf081dbb31eee7f709e0b654a1) ---- - clients/cli/devices.c | 140 ++++++++++++++++++++++++++++---------------------- - 1 file changed, 78 insertions(+), 62 deletions(-) - -diff --git a/clients/cli/devices.c b/clients/cli/devices.c -index 029ca67..38e24e7 100644 ---- a/clients/cli/devices.c -+++ b/clients/cli/devices.c -@@ -2870,28 +2870,38 @@ wifi_print_aps (NMDeviceWifi *wifi, - - typedef struct { - NmCli *nmc; -- NMDeviceWifi *wifi; -- const NMMetaAbstractInfo *const*tmpl; -- -+ NMDevice **devices; -+ const NMMetaAbstractInfo *const *tmpl; - const char *bssid_user; -+ GArray *out_indices; -+} ScanInfo; -+ -+typedef struct { -+ ScanInfo *scan_info; -+ NMDeviceWifi *wifi; - gulong last_scan_id; - guint timeout_id; - GCancellable *scan_cancellable; -- GArray *out_indices; - } WifiListData; - - static void - wifi_list_finish (WifiListData *data) - { -- NmCli *nmc = data->nmc; -- -- wifi_print_aps (data->wifi, data->nmc, data->out_indices, -- data->tmpl, data->bssid_user); -+ ScanInfo *info = data->scan_info; -+ NmCli *nmc = info->nmc; -+ guint i; - -- if (--nmc->should_wait == 0) { -+ if (--info->nmc->should_wait == 0) { -+ for (i = 0; info->devices[i]; i++) { -+ wifi_print_aps (NM_DEVICE_WIFI (info->devices[i]), -+ info->nmc, -+ info->out_indices, -+ info->tmpl, -+ info->bssid_user); -+ } - if (nmc->return_value == NMC_RESULT_ERROR_NOT_FOUND) { - g_string_printf (nmc->return_text, _("Error: Access point with bssid '%s' not found."), -- data->bssid_user); -+ data->scan_info->bssid_user); - } - g_main_loop_quit (loop); - } -@@ -2899,9 +2909,15 @@ wifi_list_finish (WifiListData *data) - g_signal_handler_disconnect (data->wifi, data->last_scan_id); - nm_clear_g_source (&data->timeout_id); - nm_clear_g_cancellable (&data->scan_cancellable); -- g_array_unref (data->out_indices); -- g_object_unref (data->wifi); - g_slice_free (WifiListData, data); -+ -+ if (info->nmc->should_wait == 0) { -+ for (i = 0; info->devices[i]; i++) -+ g_object_unref (info->devices[i]); -+ g_free (info->devices); -+ g_array_unref (info->out_indices); -+ g_free (info); -+ } - } - - static void -@@ -2945,49 +2961,6 @@ wifi_list_scan_timeout (gpointer user_data) - return G_SOURCE_REMOVE; - } - --static void --wifi_list_aps (NMDeviceWifi *wifi, -- NmCli *nmc, -- GArray *out_indices, -- const NMMetaAbstractInfo *const*tmpl, -- const char *bssid_user, -- gint64 rescan_cutoff) --{ -- gboolean needs_rescan; -- WifiListData *data; -- -- needs_rescan = rescan_cutoff < 0 || (rescan_cutoff > 0 && nm_device_wifi_get_last_scan (wifi) < rescan_cutoff); -- -- /* FIXME: nmcli should either -- * - don't request any new scan for any device and print the full AP list right -- * away. -- * - or, when requesting a scan on one or more devices, don't print the result -- * before all requests complete. -- * -- * Otherwise: -- * - the printed output is not self consistent. E.g. it will print the result -- * on one device at a certain time, while printing the result for another -- * device at a later point in time. -- * - the order in which we print the AP list per-device, is unstable. */ -- if (needs_rescan) { -- data = g_slice_new0 (WifiListData); -- data->nmc = nmc; -- data->wifi = g_object_ref (wifi); -- data->tmpl = tmpl; -- data->out_indices = g_array_ref (out_indices);; -- data->bssid_user = bssid_user; -- data->last_scan_id = g_signal_connect (wifi, "notify::" NM_DEVICE_WIFI_LAST_SCAN, -- G_CALLBACK (wifi_last_scan_updated), data); -- data->scan_cancellable = g_cancellable_new (); -- data->timeout_id = g_timeout_add_seconds (15, wifi_list_scan_timeout, data); -- nm_device_wifi_request_scan_async (wifi, data->scan_cancellable, wifi_list_rescan_cb, data); -- -- nmc->should_wait++; -- } else { -- wifi_print_aps (wifi, nmc, out_indices, tmpl, bssid_user); -- } --} -- - static void - complete_aps (NMDevice **devices, const char *ifname, - const char *bssid_prefix, const char *ssid_prefix) -@@ -3017,12 +2990,15 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv) - const char *bssid_user = NULL; - const char *rescan = NULL; - gs_free NMDevice **devices = NULL; -- guint i; - const char *fields_str = NULL; - const NMMetaAbstractInfo *const*tmpl; - gs_unref_array GArray *out_indices = NULL; - int option; - guint64 rescan_cutoff; -+ NMDeviceWifi *wifi; -+ ScanInfo *scan_info = NULL; -+ WifiListData *data; -+ guint i, j; - - devices = nmc_get_devices_sorted (nmc->client); - -@@ -3110,7 +3086,8 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv) - } - - if (NM_IS_DEVICE_WIFI (device)) { -- wifi_list_aps (NM_DEVICE_WIFI (device), nmc, out_indices, tmpl, bssid_user, rescan_cutoff); -+ devices[0] = device; -+ devices[1] = NULL; - } else { - if ( nm_device_get_device_type (device) == NM_DEVICE_TYPE_GENERIC - && g_strcmp0 (nm_device_get_type_description (device), "wifi") == 0) { -@@ -3124,13 +3101,52 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv) - } - return NMC_RESULT_ERROR_UNKNOWN; - } -+ } -+ -+ /* Filter out non-wifi devices */ -+ for (i = 0, j = 0; devices[i]; i++) { -+ if (NM_IS_DEVICE_WIFI (devices[i])) -+ devices[j++] = devices[i]; -+ } -+ devices[j] = NULL; -+ -+ /* Start a new scan for devices that need it */ -+ for (i = 0; devices[i]; i++) { -+ wifi = (NMDeviceWifi *) devices[i]; -+ g_object_ref (wifi); -+ -+ if ( rescan_cutoff == 0 -+ || (rescan_cutoff > 0 && nm_device_wifi_get_last_scan (wifi) >= rescan_cutoff)) -+ continue; -+ -+ if (!scan_info) { -+ scan_info = g_new0 (ScanInfo, 1); -+ scan_info->out_indices = g_array_ref (out_indices); -+ scan_info->tmpl = tmpl; -+ scan_info->bssid_user = bssid_user; -+ scan_info->nmc = nmc; -+ } -+ -+ nmc->should_wait++; -+ data = g_slice_new0 (WifiListData); -+ data->wifi = wifi; -+ data->scan_info = scan_info; -+ data->last_scan_id = g_signal_connect (wifi, "notify::" NM_DEVICE_WIFI_LAST_SCAN, -+ G_CALLBACK (wifi_last_scan_updated), data); -+ data->scan_cancellable = g_cancellable_new (); -+ data->timeout_id = g_timeout_add_seconds (15, wifi_list_scan_timeout, data); -+ nm_device_wifi_request_scan_async (wifi, data->scan_cancellable, wifi_list_rescan_cb, data); -+ } -+ -+ if (scan_info) { -+ scan_info->devices = g_steal_pointer (&devices); - } else { -+ /* Print results right away if no scan is pending */ - for (i = 0; devices[i]; i++) { -- NMDevice *dev = devices[i]; -- -- if (NM_IS_DEVICE_WIFI (dev)) { -- wifi_list_aps (NM_DEVICE_WIFI (dev), nmc, out_indices, tmpl, bssid_user, rescan_cutoff); -- } -+ wifi_print_aps (NM_DEVICE_WIFI (devices[i]), -+ nmc, out_indices, -+ tmpl, bssid_user); -+ g_object_unref (devices[i]); - } - } - diff --git a/debian/patches/dhcp6-fix-buffer-size-checking.patch b/debian/patches/dhcp6-fix-buffer-size-checking.patch deleted file mode 100644 index 921573b8..00000000 --- a/debian/patches/dhcp6-fix-buffer-size-checking.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Yu Watanabe -Date: Thu, 27 Sep 2018 23:48:51 +0900 -Subject: dhcp6: fix buffer size checking - -(cherry picked from commit cb1bdeaf56852275e6b0dd1fba932bb174767f70) -(cherry picked from commit 91fb1673d5217aaf1461998fd2675630f5c265f9) ---- - src/systemd/src/libsystemd-network/sd-dhcp6-client.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c -index 8444a75..0b261a2 100644 ---- a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c -+++ b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c -@@ -818,8 +818,8 @@ static int client_parse_message( - uint8_t *optval; - be32_t iaid_lease; - -- if (len < offsetof(DHCP6Option, data) || -- len < offsetof(DHCP6Option, data) + be16toh(option->len)) -+ if (len < pos + offsetof(DHCP6Option, data) || -+ len < pos + offsetof(DHCP6Option, data) + be16toh(option->len)) - return -ENOBUFS; - - optcode = be16toh(option->code); diff --git a/debian/patches/dhcp6-make-sure-we-have-enough-space-for-the-DHCP6-option.patch b/debian/patches/dhcp6-make-sure-we-have-enough-space-for-the-DHCP6-option.patch deleted file mode 100644 index 3c5c4051..00000000 --- a/debian/patches/dhcp6-make-sure-we-have-enough-space-for-the-DHCP6-option.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Lennart Poettering -Date: Fri, 19 Oct 2018 12:12:33 +0200 -Subject: dhcp6: make sure we have enough space for the DHCP6 option header - -Fixes a vulnerability originally discovered by Felix Wilhelm from -Google. - -CVE-2018-15688 -LP: #1795921 -https://bugzilla.redhat.com/show_bug.cgi?id=1639067 - -(cherry picked from commit 4dac5eaba4e419b29c97da38a8b1f82336c2c892) -(cherry picked from commit 01ca2053bbea09f35b958c8cc7631e15469acb79) -(cherry picked from commit fc230dca139142f409d7bac99dbfabe9b004e2fb) ---- - src/systemd/src/libsystemd-network/dhcp6-option.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/systemd/src/libsystemd-network/dhcp6-option.c b/src/systemd/src/libsystemd-network/dhcp6-option.c -index be5c222..2297044 100644 ---- a/src/systemd/src/libsystemd-network/dhcp6-option.c -+++ b/src/systemd/src/libsystemd-network/dhcp6-option.c -@@ -105,7 +105,7 @@ int dhcp6_option_append_ia(uint8_t **buf, size_t *buflen, DHCP6IA *ia) { - return -EINVAL; - } - -- if (*buflen < len) -+ if (*buflen < offsetof(DHCP6Option, data) + len) - return -ENOBUFS; - - ia_hdr = *buf; diff --git a/debian/patches/sd-dhcp-lease-fix-memleaks.patch b/debian/patches/sd-dhcp-lease-fix-memleaks.patch deleted file mode 100644 index 4866a6f6..00000000 --- a/debian/patches/sd-dhcp-lease-fix-memleaks.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Yu Watanabe -Date: Thu, 27 Sep 2018 18:04:59 +0900 -Subject: sd-dhcp-lease: fix memleaks - -(cherry picked from commit e2975f854831d08a25b4f5eb329b6d04102e115f) -(cherry picked from commit 157094abd83f933fad142758a7d177cfa1a347f7) ---- - src/systemd/src/libsystemd-network/sd-dhcp-lease.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/systemd/src/libsystemd-network/sd-dhcp-lease.c b/src/systemd/src/libsystemd-network/sd-dhcp-lease.c -index d240259..cac07d3 100644 ---- a/src/systemd/src/libsystemd-network/sd-dhcp-lease.c -+++ b/src/systemd/src/libsystemd-network/sd-dhcp-lease.c -@@ -279,6 +279,8 @@ sd_dhcp_lease *sd_dhcp_lease_unref(sd_dhcp_lease *lease) { - free(option); - } - -+ free(lease->root_path); -+ free(lease->timezone); - free(lease->hostname); - free(lease->domainname); - free(lease->dns); diff --git a/debian/patches/sd-dhcp-remove-unreachable-route-after-rebinding-return-N.patch b/debian/patches/sd-dhcp-remove-unreachable-route-after-rebinding-return-N.patch deleted file mode 100644 index f49c9476..00000000 --- a/debian/patches/sd-dhcp-remove-unreachable-route-after-rebinding-return-N.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Li Song -Date: Fri, 19 Oct 2018 13:41:51 -0400 -Subject: sd-dhcp: remove unreachable route after rebinding return NAK - -(cherry picked from commit cc3981b1272b9ce37e7d734a7b2f42e84acac535) -(cherry picked from commit 915c2f675a23b2ae16d292d1ac570706f76b384d) -(cherry picked from commit cb77290a696dce924e2a993690634986ac035490) ---- - src/systemd/src/libsystemd-network/sd-dhcp-client.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/systemd/src/libsystemd-network/sd-dhcp-client.c b/src/systemd/src/libsystemd-network/sd-dhcp-client.c -index 42707f1..9158945 100644 ---- a/src/systemd/src/libsystemd-network/sd-dhcp-client.c -+++ b/src/systemd/src/libsystemd-network/sd-dhcp-client.c -@@ -1688,6 +1688,8 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message, i - client->timeout_resend = - sd_event_source_unref(client->timeout_resend); - -+ client_notify(client, SD_DHCP_CLIENT_EVENT_EXPIRED); -+ - r = client_initialize(client); - if (r < 0) - goto error; diff --git a/debian/patches/sd-dhcp6-fix-argument-and-error-handling-of-dhcp6_option_.patch b/debian/patches/sd-dhcp6-fix-argument-and-error-handling-of-dhcp6_option_.patch deleted file mode 100644 index c04a95a9..00000000 --- a/debian/patches/sd-dhcp6-fix-argument-and-error-handling-of-dhcp6_option_.patch +++ /dev/null @@ -1,60 +0,0 @@ -From: Yu Watanabe -Date: Fri, 19 Oct 2018 03:44:56 +0900 -Subject: sd-dhcp6: fix argument and error handling of - dhcp6_option_parse_status() - -(cherry picked from commit 91c43f3978fa7c8341550b9ca279e460ba7e74e6) -(cherry picked from commit 373cbfc8c6e9591b3c8cc12d58c4b31ac35ab24f) -(cherry picked from commit 0e93fd895daa6f0f578ffa8fc4ed3e0ea85c62e8) ---- - src/systemd/src/libsystemd-network/dhcp6-option.c | 10 ++++++---- - src/systemd/src/libsystemd-network/sd-dhcp6-client.c | 9 +++++---- - 2 files changed, 11 insertions(+), 8 deletions(-) - -diff --git a/src/systemd/src/libsystemd-network/dhcp6-option.c b/src/systemd/src/libsystemd-network/dhcp6-option.c -index ff1cbf1..cfddefc 100644 ---- a/src/systemd/src/libsystemd-network/dhcp6-option.c -+++ b/src/systemd/src/libsystemd-network/dhcp6-option.c -@@ -465,13 +465,15 @@ int dhcp6_option_parse_ia(DHCP6Option *iaoption, DHCP6IA *ia) { - - case SD_DHCP6_OPTION_STATUS_CODE: - -- status = dhcp6_option_parse_status(option, optlen); -- if (status) { -+ status = dhcp6_option_parse_status(option, optlen + sizeof(DHCP6Option)); -+ if (status < 0) { -+ r = status; -+ goto error; -+ } -+ if (status > 0) { - log_dhcp6_client(client, "IA status %d", - status); - -- dhcp6_lease_free_ia(ia); -- - r = -EINVAL; - goto error; - } -diff --git a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c -index 0b261a2..b694786 100644 ---- a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c -+++ b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c -@@ -870,13 +870,14 @@ static int client_parse_message( - break; - - case SD_DHCP6_OPTION_STATUS_CODE: -- status = dhcp6_option_parse_status(option, optlen); -- if (status) { -+ status = dhcp6_option_parse_status(option, optlen + sizeof(DHCP6Option)); -+ if (status < 0) -+ return status; -+ -+ if (status > 0) { - log_dhcp6_client(client, "%s Status %s", - dhcp6_message_type_to_string(message->type), - dhcp6_message_status_to_string(status)); -- dhcp6_lease_free_ia(&lease->ia); -- dhcp6_lease_free_ia(&lease->pd); - - return -EINVAL; - } diff --git a/debian/patches/sd-dhcp6-make-dhcp6_option_parse_domainname-not-store-emp.patch b/debian/patches/sd-dhcp6-make-dhcp6_option_parse_domainname-not-store-emp.patch deleted file mode 100644 index f8144605..00000000 --- a/debian/patches/sd-dhcp6-make-dhcp6_option_parse_domainname-not-store-emp.patch +++ /dev/null @@ -1,111 +0,0 @@ -From: Yu Watanabe -Date: Fri, 19 Oct 2018 03:42:10 +0900 -Subject: sd-dhcp6: make dhcp6_option_parse_domainname() not store empty - domain - -This improves performance of fuzzer. -C.f. oss-fuzz#11019. - -(cherry picked from commit 3c72b6ed4252e7ff5f7704bfe44557ec197b47fa) -(cherry picked from commit 50403cccee28c7dcd54b138a0d3b3f69ea0204fe) -(cherry picked from commit f11f5abb1a8b96b553d2d156f8b5cf440695c04d) ---- - src/systemd/src/libsystemd-network/dhcp6-option.c | 66 ++++++++++------------- - 1 file changed, 29 insertions(+), 37 deletions(-) - -diff --git a/src/systemd/src/libsystemd-network/dhcp6-option.c b/src/systemd/src/libsystemd-network/dhcp6-option.c -index cfddefc..be5c222 100644 ---- a/src/systemd/src/libsystemd-network/dhcp6-option.c -+++ b/src/systemd/src/libsystemd-network/dhcp6-option.c -@@ -555,6 +555,7 @@ int dhcp6_option_parse_domainname(const uint8_t *optval, uint16_t optlen, char * - bool first = true; - - for (;;) { -+ const char *label; - uint8_t c; - - c = optval[pos++]; -@@ -562,47 +563,41 @@ int dhcp6_option_parse_domainname(const uint8_t *optval, uint16_t optlen, char * - if (c == 0) - /* End of name */ - break; -- else if (c <= 63) { -- const char *label; -- -- /* Literal label */ -- label = (const char *)&optval[pos]; -- pos += c; -- if (pos >= optlen) -- return -EMSGSIZE; -- -- if (!GREEDY_REALLOC(ret, allocated, n + !first + DNS_LABEL_ESCAPED_MAX)) { -- r = -ENOMEM; -- goto fail; -- } -- -- if (first) -- first = false; -- else -- ret[n++] = '.'; -- -- r = dns_label_escape(label, c, ret + n, DNS_LABEL_ESCAPED_MAX); -- if (r < 0) -- goto fail; -- -- n += r; -- continue; -- } else { -- r = -EBADMSG; -- goto fail; -- } -- } -+ if (c > 63) -+ return -EBADMSG; -+ -+ /* Literal label */ -+ label = (const char *)&optval[pos]; -+ pos += c; -+ if (pos >= optlen) -+ return -EMSGSIZE; -+ -+ if (!GREEDY_REALLOC(ret, allocated, n + !first + DNS_LABEL_ESCAPED_MAX)) -+ return -ENOMEM; -+ -+ if (first) -+ first = false; -+ else -+ ret[n++] = '.'; -+ -+ r = dns_label_escape(label, c, ret + n, DNS_LABEL_ESCAPED_MAX); -+ if (r < 0) -+ return r; - -- if (!GREEDY_REALLOC(ret, allocated, n + 1)) { -- r = -ENOMEM; -- goto fail; -+ n += r; - } - -+ if (n == 0) -+ continue; -+ -+ if (!GREEDY_REALLOC(ret, allocated, n + 1)) -+ return -ENOMEM; -+ - ret[n] = 0; - - r = strv_extend(&names, ret); - if (r < 0) -- goto fail; -+ return r; - - idx++; - } -@@ -610,7 +605,4 @@ int dhcp6_option_parse_domainname(const uint8_t *optval, uint16_t optlen, char * - *str_arr = TAKE_PTR(names); - - return idx; -- --fail: -- return r; - } diff --git a/debian/patches/series b/debian/patches/series index a5646381..6da89bb7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,13 +1,3 @@ Force-online-state-with-unmanaged-devices.patch Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch Don-t-make-NetworkManager-D-Bus-activatable.patch -sd-dhcp-lease-fix-memleaks.patch -dhcp6-fix-buffer-size-checking.patch -sd-dhcp6-fix-argument-and-error-handling-of-dhcp6_option_.patch -sd-dhcp6-make-dhcp6_option_parse_domainname-not-store-emp.patch -sd-dhcp-remove-unreachable-route-after-rebinding-return-N.patch -dhcp6-make-sure-we-have-enough-space-for-the-DHCP6-option.patch -cli-wait-for-all-wifi-scans-to-finish-before-displaying-t.patch -cli-fix-memory-leaks.patch -cli-tests-fix-output-on-failure.patch -tests-simulate-old-LastScan-wifi-value-in-test-networkman.patch diff --git a/debian/patches/tests-simulate-old-LastScan-wifi-value-in-test-networkman.patch b/debian/patches/tests-simulate-old-LastScan-wifi-value-in-test-networkman.patch deleted file mode 100644 index 31ec7ee6..00000000 --- a/debian/patches/tests-simulate-old-LastScan-wifi-value-in-test-networkman.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Beniamino Galvani -Date: Fri, 2 Nov 2018 13:49:25 +0100 -Subject: tests: simulate old LastScan wifi value in - test-networkmanager-service.py - -In this way clients will randomly find that the AP list is older than -30 seconds and they will issue a new scan. - -(cherry picked from commit 5ba301f4eb652a208a500a39d59dadf427a64590) -(cherry picked from commit 9b0735f6fd9d69b486d54a7ed99b595c111e54f7) ---- - tools/test-networkmanager-service.py | 12 ++---------- - 1 file changed, 2 insertions(+), 10 deletions(-) - -diff --git a/tools/test-networkmanager-service.py b/tools/test-networkmanager-service.py -index 8a37fb1..9aa44a9 100755 ---- a/tools/test-networkmanager-service.py -+++ b/tools/test-networkmanager-service.py -@@ -916,16 +916,8 @@ class WifiDevice(Device): - self.aps = [] - self.scan_cb_id = None - -- # Note: we would like to simulate how nmcli calls RequestScan() and we could -- # do so by using an older timestamp. However, that makes the client tests -- # racy, because if a bunch of nmcli instances run in parallel against this -- # service, earlier instances will issue a RequestScan(), while later instances -- # won't do that (because the LastScan timestamp is already updated). That means, -- # the later instances will print the scan result immediately, and in another sort -- # order. That should be fixed, by nmcli not starting to print anything, before -- # all RequestScan() requests complete, and thus, always print a consistent list -- # of results. -- ts = NM.utils_get_timestamp_msec() -+ # Use a randomly older timestamp to trigger RequestScan() from the client -+ ts = max(0, NM.utils_get_timestamp_msec() - Util.random_int(self.path, 20000, 40000)) - - props = { - PRP_WIFI_HW_ADDRESS: mac, -- cgit 1.3.0-6-gf8a5 From e60e21acf2c84538f9cd75be952dd53ecd4eda2e Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 26 Feb 2019 19:16:52 +0100 Subject: Do not manage Docker bridge interfaces Closes: #875127 --- .../Do-not-manage-Docker-bridge-interfaces.patch | 24 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 25 insertions(+) create mode 100644 debian/patches/Do-not-manage-Docker-bridge-interfaces.patch (limited to 'debian') diff --git a/debian/patches/Do-not-manage-Docker-bridge-interfaces.patch b/debian/patches/Do-not-manage-Docker-bridge-interfaces.patch new file mode 100644 index 00000000..9525cc2a --- /dev/null +++ b/debian/patches/Do-not-manage-Docker-bridge-interfaces.patch @@ -0,0 +1,24 @@ +From: Andrei Dziahel +Date: Mon, 17 Sep 2018 10:03:15 +0000 +Subject: Do not manage Docker bridge interfaces + +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/15 +(cherry picked from commit 0ce73275506e8d3156b8d3cd9ca7a1105c5dc4fb) +--- + data/85-nm-unmanaged.rules | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/data/85-nm-unmanaged.rules b/data/85-nm-unmanaged.rules +index edc4ddb..20f4d29 100644 +--- a/data/85-nm-unmanaged.rules ++++ b/data/85-nm-unmanaged.rules +@@ -26,6 +26,9 @@ ATTR{address}=="00:1c:42:*", ENV{INTERFACE}=="vnic[0-9]*", ENV{NM_UNMANAGED}="1" + # in another net namespace and managed by libvirt, Docker or the like. + ENV{ID_NET_DRIVER}=="veth", ENV{NM_UNMANAGED}="1" + ++# Docker bridge. Managed by docker daemon. ++ATTR{address}=="02:42:*", ENV{INTERFACE}=="docker[0-9]*", ENV{NM_UNMANAGED}="1" ++ + # USB gadget device. Unmanage by default, since whatever created it + # might want to set it up itself (e.g. activate an ipv4.method=shared + # connection). diff --git a/debian/patches/series b/debian/patches/series index 6da89bb7..fdf5b213 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ +Do-not-manage-Docker-bridge-interfaces.patch Force-online-state-with-unmanaged-devices.patch Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch Don-t-make-NetworkManager-D-Bus-activatable.patch -- cgit 1.3.0-6-gf8a5 From c9f65a7cc31dd2412fd730523b05c2099172ca70 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 26 Feb 2019 19:33:50 +0100 Subject: Bump Standards-Version to 4.3.0 --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index fc282213..f42b6bf5 100644 --- a/debian/control +++ b/debian/control @@ -40,7 +40,7 @@ Build-Depends: debhelper-compat (= 12), valac (>= 0.17.1.24), dbus , python-dbus -Standards-Version: 4.2.1 +Standards-Version: 4.3.0 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 23ee58e8207cc232f91bec1ea7117026b84498e2 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 26 Feb 2019 19:34:08 +0100 Subject: Release version 1.14.6-1 to unstable --- debian/changelog | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 25589d9e..849260e4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,12 @@ -network-manager (1.14.6-1) UNRELEASED; urgency=medium +network-manager (1.14.6-1) unstable; urgency=medium * New upstream version 1.14.6 * Use debhelper-compat (= 12) Build-Depends and drop debian/compat + * Rebase patches + * Do not manage Docker bridge interfaces (Closes: #875127) + * Bump Standards-Version to 4.3.0 - -- Michael Biebl Tue, 26 Feb 2019 19:02:37 +0100 + -- Michael Biebl Tue, 26 Feb 2019 19:33:53 +0100 network-manager (1.14.4-4) unstable; urgency=medium -- cgit 1.3.0-6-gf8a5 From d9a08837575148bbfb1a45a9230681ad8e6d3497 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 26 Feb 2019 21:22:22 +0100 Subject: supplicant: fix setting pmf when the supplicant doesn't advertise support --- debian/patches/series | 1 + ...etting-pmf-when-the-supplicant-doesn-t-ad.patch | 74 ++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 debian/patches/supplicant-fix-setting-pmf-when-the-supplicant-doesn-t-ad.patch (limited to 'debian') diff --git a/debian/patches/series b/debian/patches/series index fdf5b213..b21e8a16 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,5 @@ Do-not-manage-Docker-bridge-interfaces.patch +supplicant-fix-setting-pmf-when-the-supplicant-doesn-t-ad.patch Force-online-state-with-unmanaged-devices.patch Don-t-setup-Sleep-Monitor-if-not-booted-with-systemd.patch Don-t-make-NetworkManager-D-Bus-activatable.patch diff --git a/debian/patches/supplicant-fix-setting-pmf-when-the-supplicant-doesn-t-ad.patch b/debian/patches/supplicant-fix-setting-pmf-when-the-supplicant-doesn-t-ad.patch new file mode 100644 index 00000000..38930c48 --- /dev/null +++ b/debian/patches/supplicant-fix-setting-pmf-when-the-supplicant-doesn-t-ad.patch @@ -0,0 +1,74 @@ +From: Beniamino Galvani +Date: Mon, 25 Feb 2019 08:38:22 +0100 +Subject: supplicant: fix setting pmf when the supplicant doesn't advertise + support + +wpa_supplicant only advertises pmf support since commit [1], which is +after 2.6. When using a version without that commit (for example, +plain 2.6), we would unconditionally set the global Pmf property to 1 +(optional) and then skip setting the per-network property. The result +was that pmf was enabled without the possibility to disable it by +user. The correct behavior is instead to disable pmf on such versions. + +[1] https://w1.fi/cgit/hostap/commit/?id=3cdb4ac074f76accf24a51d143db545afad2c90b + +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/129 +(cherry picked from commit 560a35dd433cd6bf2268aaf757fda798f35712fe) +(cherry picked from commit b837561bb6fc09d4134ac8c5c6dc5ac1885ebf62) +(cherry picked from commit 353743b99520ba481d08b52b31af16dcfc80d39f) +--- + src/supplicant/nm-supplicant-interface.c | 33 +++++++++++++++++--------------- + 1 file changed, 18 insertions(+), 15 deletions(-) + +diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c +index 0af9ebd..b2a89ce 100644 +--- a/src/supplicant/nm-supplicant-interface.c ++++ b/src/supplicant/nm-supplicant-interface.c +@@ -568,9 +568,8 @@ iface_set_pmf_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) + + self = NM_SUPPLICANT_INTERFACE (user_data); + +- /* This can fail if the supplicant doesn't support PMF */ + if (error) +- _LOGD ("failed to set Pmf=1: %s", error->message); ++ _LOGW ("failed to set Pmf=1: %s", error->message); + + iface_check_ready (self); + } +@@ -1175,19 +1174,23 @@ on_iface_proxy_acquired (GDBusProxy *proxy, GAsyncResult *result, gpointer user_ + NULL, + NULL); + +- /* Initialize global PMF setting to 'optional' */ +- priv->ready_count = 1; +- g_dbus_proxy_call (priv->iface_proxy, +- DBUS_INTERFACE_PROPERTIES ".Set", +- g_variant_new ("(ssv)", +- WPAS_DBUS_IFACE_INTERFACE, +- "Pmf", +- g_variant_new_string ("1")), +- G_DBUS_CALL_FLAGS_NONE, +- -1, +- priv->init_cancellable, +- (GAsyncReadyCallback) iface_set_pmf_cb, +- self); ++ priv->ready_count = 0; ++ ++ if (priv->pmf_support == NM_SUPPLICANT_FEATURE_YES) { ++ /* Initialize global PMF setting to 'optional' */ ++ priv->ready_count++; ++ g_dbus_proxy_call (priv->iface_proxy, ++ DBUS_INTERFACE_PROPERTIES ".Set", ++ g_variant_new ("(ssv)", ++ WPAS_DBUS_IFACE_INTERFACE, ++ "Pmf", ++ g_variant_new_string ("1")), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ priv->init_cancellable, ++ (GAsyncReadyCallback) iface_set_pmf_cb, ++ self); ++ } + + /* Check whether NetworkReply and AP mode are supported */ + priv->ready_count++; -- cgit 1.3.0-6-gf8a5 From 61ab6036007ca162bd3a54615c9db2f8e2af2267 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 26 Feb 2019 21:23:31 +0100 Subject: Release version 1.14.6-2 to unstable --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 849260e4..7cb171e5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +network-manager (1.14.6-2) unstable; urgency=medium + + * supplicant: fix setting pmf when the supplicant doesn't advertise support + + -- Michael Biebl Tue, 26 Feb 2019 21:23:14 +0100 + network-manager (1.14.6-1) unstable; urgency=medium * New upstream version 1.14.6 -- cgit 1.3.0-6-gf8a5 From f66fcea265a5869667d832386e9337237a44afef Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 31 Mar 2019 10:11:16 +0200 Subject: Revert "Use debhelper-compat (= 12) Build-Depends and drop debian/compat" This reverts commit 12aead6b161a3312673ac62686af0350061c0666. --- debian/compat | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 debian/compat (limited to 'debian') diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..48082f72 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +12 diff --git a/debian/control b/debian/control index f42b6bf5..95eeea17 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Maintainer: Utopia Maintenance Team , Sjoerd Simons , Aron Xu -Build-Depends: debhelper-compat (= 12), +Build-Depends: debhelper (>= 11.4~), automake (>= 1.12), dpkg-dev (>= 1.17.14), pkg-config, -- cgit 1.3.0-6-gf8a5