summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * libnm: sort attribute names in nm_ip_address_get_attribute_names()Thomas Haller2017-12-181-14/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The order in which the attribute names are returns should be defined and stable. Sort them and re-use the helper functions. Sorting is good, because it gives a consistent order. Maybe we don't want to commit to this in the API, officially the order is still arbitrary. In practice, we rely on the order of attribute names when converting the attributes to a string. The same configuration should produce the same string representation. That doesn't mean we commit to a fixed order in the string representation. It does not mean, that the order must always be this way, we can still change it. But between multiple runs of the same binary, the order should be stable. Note that our hash tables are seeded with a random number. Hence, their order is not only abitrary, it is also unstable and changes for each run of the application.
| * libnm: use nm_utils_strdict_get_keys() for getting attribute-names of ip-routesThomas Haller2017-12-181-32/+4
| | | | | | | | Use the new helper methods to avoid duplicate code.
| * shared: add nm_utils_strv_make_deep_copied() helperThomas Haller2017-12-182-0/+25
| | | | | | | | | | | | | | | | | | | | | | At several places we create strv arrays where the strings themself are not deep-copied. This helper function iterates over such an "const char **" array, clones the strings, and updates the strv array inplace to be a "char **" strv array. This helper function is to reduce code duplication.
| * shared: add nm_utils_strdict_get_keys() helperThomas Haller2017-12-182-0/+31
|/ | | | | | | | At various places we get the (string) keys of a GHashTable. Add a helper function that does that, including an argument for optional sorting. The helper function is there to get reduce code duplication.
* build: use template files for enum types' sources generationIñigo Martínez2017-12-1831-141/+552
| | | | | | | | | | Source files for enum types are generated by passing segments of the source code of the files to the `glib-mkenums` command. This patch removes those parameters where source code is used from meson build files by moving those segmeents to template files. https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00057.html
* build: merge branch 'meson-generate-build-docs'Thomas Haller2017-12-185-77/+61
|\ | | | | | | | | https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00053.html https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00054.html
| * build: Merge no introspection headers with public headersIñigo Martínez2017-12-163-22/+13
| | | | | | | | | | | | | | | | | | | | There are three headers `nm-secret-agent-old.h`, `nm-vpn-plugin-old.h`, and `nm-vpn-service-plugin.h`, which are named as no introspection headers. However, these files also join to the rest headers to generate introspection data. This patch merges those no introspection headers with the public headers.
| * build: Make generate-plugin-docs.pl independent of autotoolsIñigo Martínez2017-12-164-55/+48
|/ | | | | | | | | | | | `generate-plugin-docs.pl` script which is used to parse `nm-setting-c*.c` files depends on autotools. This is because it parses the `Makefile.am` in order to figure out the setting files it needs to parse. This patch makes the script independent of autotools by passing the necessary setting files by command line instead of parsing the `Makefile.am` file. It also changes the autotools' and meson's accordingly.
* all: merge branch 'th/static-asserts'Thomas Haller2017-12-1515-41/+54
|\ | | | | | | https://github.com/NetworkManager/NetworkManager/pull/40
| * shared: add static assert for nm_g_slice_free_fcn() argumentth/static-assertsThomas Haller2017-12-152-2/+15
| |
| * build: add "-Wvla" to warn about uses of variable-length arraysThomas Haller2017-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't use them, so add a compiler warning about their use. I think they are annoying, because sizeof(x) and typeof(x) might evaluate at runtime. Especially the typeof() extension is useful for macros, but behaves badly with variable-length arrays due to running code at runtime. But the worst is, G_STATIC_ASSERT() is implemented by declaring an array of negative length. Usually, the checked condition should be a compile time constant, but with VLAs the compiler would not evaluate the static-assert at compile time and instead accept it silently. It's easy to mess up static asserts to wrongly have a non-constant condition, especially when the static-assert is used inside a macro. Just say no.
| * core: don't use const integers where const expression is neededThomas Haller2017-12-152-4/+6
| |
| * tests: fix invalid static-asserts with non-const expressionThomas Haller2017-12-151-17/+10
| | | | | | | | The expression is not const. Use a run-time assert instead
| * core: don't use variable length arraysThomas Haller2017-12-153-9/+13
| | | | | | | | | | Let's compile with -Wvla, so that G_STATIC_ASSERT() is really static. But then we cannot use variable length arrays.
| * all: don't use NM_FLAGS_HAS() with non-constant argumentThomas Haller2017-12-157-9/+9
|/ | | | | | | | | | | NM_FLAGS_HAS() uses a static-assert that the second argument is a single flag (power of two). With a single flag, NM_FLAGS_HAS(), NM_FLAGS_ANY() and NM_FLAGS_ALL() are all identical. The second argument must be a compile time constant, and if that is not the case, one must not use NM_FLAGS_HAS(). Use NM_FLAGS_ANY() in these cases.
* core: merge branch 'th/device-route-metric-rh1505893'Thomas Haller2017-12-159-107/+652
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1505893
| * device: generate unique default route-metrics per interfaceThomas Haller2017-12-153-2/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the past we had NMDefaultRouteManager which would coordinate adding the default-route with identical metrics. That especially happened, when activating two devices of the same type, without explicitly specifying ipv4.route-metric. For example, with ethernet devices, the routes on both interfaces would get a metric of 100. Coordinating routes was especially necessary, because we added routes with NLM_F_EXCL flag, akin to `ip route replace`. We not only had to avoid that activating two devices in NetworkManager would result in a fight over the default-route, but more importently to preserve externally added default-routes on unmanaged interfaces. NMDefaultRouteManager would ensure that in case of duplicate metrics, that the device that activated first would keep the best default-route. It would do so by bumping the metric of the second device to find a unused metric. The bumping itself was not very important -- MDefaultRouteManager could also just not configure any default-routes that show up as second, the result would be quite similar. More important was to keep the best default-route on the first activating device until the device deactivates or a device activates that really has a better default-route.. Likewise, NMRouteManager would globally manage non-default-routes. It would not do any bumping of metrics, but it would also ensure that the routes of the device that activates first are not overwritten by a device activating later. However, the `ip route replace` approach has downsides, especially that it messes with routes on other interfaces, interfaces that are possibly not managed by NetworkManager. Another downside is, that binding a socket to an interface might not result in correct routes, because the route might just not be there (in case of NMRouteManager, which wouldn't configure duplicate routes by bumping their metric). Since commit 77ec302714795f905301d500b9aab6c88001f32e we would no longer use NLM_F_EXCL, but add routes akin to `ip route append`. When activating for example two ethernet devices with no explict route metric configuration, there are two routes like default via 10.16.122.254 dev eth0 proto dhcp metric 100 default via 192.168.100.1 dev eth1 proto dhcp metric 100 This does not only affect default routes. In case of a multi-homing setup you'd get 192.168.100.0/24 dev eth0 proto kernel scope link src 192.168.100.1 metric 100 192.168.100.0/24 dev eth1 proto kernel scope link src 192.168.100.1 metric 100 but it's visible the most for default-routes. Note that we would append the routes that are activated later, as the order of `ip route show` confirms. One might hence expect, that kernel selects a route based on the order in the routing tables. However, that isn't the case, and activating the second interface will non-deterministically re-route traffic via the new interface. That will interfere badly with with NAT, stateful firewalls, and existing connections (like TCP). The solution is to have NMManager keep a global index of the default route-metrics currently in use. So, instead of determining the default-route metric based solely on the device-type, we now in addition generate default metrics that do not overlap. For example, if you activate eth0 first, it gets route-metric 100, and if you then activate eth1, it gets 101. Note that if you deactivate and re-activate eth0, then it will get route-metric 102, because the best route should stick on eth1 (which reserves the range 100 to 101). Note that when a connection explititly selects a particular metric, then that choice is honored (contrary to NMDefaultRouteManager which was more concerned with avoiding conflicts, then keeping the exact metric). https://bugzilla.redhat.com/show_bug.cgi?id=1505893
| * core: add read/write support for route-metric to NMConfig's device stateThomas Haller2017-12-153-8/+36
| |
| * core: cache device state in NMConfig and load all at onceThomas Haller2017-12-154-71/+156
| | | | | | | | | | | | | | | | | | | | NMManager will need to know the state of all device at once. Hence, load it once and cache it in NMConfig. Note that this wastes a bit of memory in the order of O(number-of-interfaces). But each device state entry is rather small, and we always consume memory in the order of O(number-of-interfaces).
| * core: add nm_config_keyfile_get_int64() utilThomas Haller2017-12-152-0/+34
| |
| * device: expose nm_device_get_route_metric_default()Thomas Haller2017-12-152-4/+6
| |
| * utils: extend binary-search to return the first/last indexThomas Haller2017-12-153-24/+167
|/ | | | | | | | | | binary-search can find an index of a matching entry in a sorted list. However, if the list contains multiple entries that compare equal, it can be interesting to find the first/last entry. For example, if you want to append new items after the last. Extend binary search to optionally continue the binary search to determine the range that compares equal.
* cli: fix editor crashBeniamino Galvani2017-12-151-1/+1
| | | | | | Ensure @cmd_arg0 is not freed when returning it. Fixes: 886994359411e08d66a6b4bc8bacb68360d5176a
* platform: fix ipv6 address synchronizationBeniamino Galvani2017-12-151-31/+39
| | | | | | | | | | The @keep_link_local logic was wrong: when set to TRUE we must not delete addresses and when set to FALSE we must delete addresses only if they are unknown. Also, ignore link-local addresses when comparing positions. Fixes: 19d6d54b6f8ce26039c411a0b686b7c99bc4ee49
* gitignore: ignore default meson build directory "build"Thomas Haller2017-12-151-0/+2
|
* src/tests: fix test_nm_utils_kill_child() under mesonThomas Haller2017-12-151-12/+29
| | | | | | | | | | | | | | | | meson spawns the tests in a way that the test process is a session leader. Since the test wants to create a new process group to kill a group of processes that it starts, it failed. $ meson test -C build test-general-with-expect The test would have succeed when wrapping the test for example by strace: $ meson test -C build --wrap='strace' test-general-with-expect Fix that, by forking once more.
* src/tests: split test code in test_nm_utils_kill_child()Thomas Haller2017-12-151-9/+16
| | | | | Move the actual tests to a separate function. The remaingin parts currently setup and kill a process group, but that needs adjustment.
* build: rename unit tests with the `test-` patternIñigo Martínez2017-12-148-35/+18
| | | | | | | | | | | | There are some tests located in different directories which are using the same name. To avoid any confussion a prefix was used to name the test and the target. This patch uses the prefix just for the target, to avoid any collision that may happen, and uses the `test-` pattern as the name. https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00051.html
* build: fix test-ndisc-linux testIñigo Martínez2017-12-141-15/+19
| | | | | | | | | The `test-ndisc-linux` test is being run as an unit test. However, it is not meant to be run as one of them. This patch simply builts it as not installable binary. https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00050.html
* build: fix libnm_linking testIñigo Martínez2017-12-141-1/+1
| | | | | | | | | | | | | | | The `libnm_linking` test that belongs to the libnm-util's general tests is failing because the test is not able to find the `test-libnm-linking` binary, which is executed as a child process. The problem lies to the `BUILD_DIR` macro definition which is used to set the place to find the binary, and is wrongly defined with the source directory. This patch changes its value to the build directory that fixes the problem. https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00049.html
* build: fix targets generated by generate-settings-docs.pyIñigo Martínez2017-12-141-35/+4
| | | | | | | | | | | | | generate-settings-docs.py script is used to generate the `nm-settings-docs.xml` and `nm-property-docs.xml` files. However, to generate these files properly, the path where `libnm` shared library is built must be passed to the script. This patch uses the recently added `--lib-path` parameter to pass the `libnm`'s built directory, which allows the proper generation of the files in meson. https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00045.html
* build: library paths as parameters for generate-settings-docs.pyIñigo Martínez2017-12-141-0/+5
| | | | | | | | | | | | | | | | | | generate-settings-docs.py script uses the `LD_LIBRARY_PATH` to prepend directories to the library search path, which is useful to load a just built libnm shared library, when generating the `nm-settings-docs.xml` and `nm-property-docs.xml` files. However, this is a problem for meson, which is not able to set environment variables when executing the script. This patch adds a new optional parameter, `-l` or `--lib-path` that can be used to pass different paths to be prepended without using the `LD_LIBRARY_PATH` environment, which can still be used. [thaller@redhat.com: fix script to handle None lib_path argument] https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00044.html
* systemd: merge branch systemd into masterThomas Haller2017-12-148-10/+59
|\ | | | | | | | | | | | | Reimport systemd because it uses STRLEN() macro. We need to when building with -Wvla warning enabled. Related: https://github.com/systemd/systemd/pull/7625
| * systemd: update code from upstream (2017-12-14)Thomas Haller2017-12-148-10/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git on 2017-12-14, git commit a327431bd168b2f327f3cd422379e213c643f2a5. ====== SYSTEMD_DIR=../systemd COMMIT=a327431bd168b2f327f3cd422379e213c643f2a5 ( cd "$SYSTEMD_DIR" git checkout "$COMMIT" git reset --hard git clean -fdx ) git ls-files :/src/systemd/src/ \ :/shared/nm-utils/siphash24.c \ :/shared/nm-utils/siphash24.h \ :/shared/nm-utils/unaligned.h | \ xargs -d '\n' rm -f nm_copy_sd() { mkdir -p "./src/systemd/$(dirname "$1")" cp "$SYSTEMD_DIR/$1" "./src/systemd/$1" } nm_copy_sd_shared() { mkdir -p "./shared/nm-utils/" cp "$SYSTEMD_DIR/$1" "./shared/nm-utils/${1##*/}" } nm_copy_sd "src/basic/alloc-util.c" nm_copy_sd "src/basic/alloc-util.h" nm_copy_sd "src/basic/async.h" nm_copy_sd "src/basic/escape.c" nm_copy_sd "src/basic/escape.h" nm_copy_sd "src/basic/ether-addr-util.c" nm_copy_sd "src/basic/ether-addr-util.h" nm_copy_sd "src/basic/extract-word.c" nm_copy_sd "src/basic/extract-word.h" nm_copy_sd "src/basic/fileio.c" nm_copy_sd "src/basic/fileio.h" nm_copy_sd "src/basic/fd-util.c" nm_copy_sd "src/basic/fd-util.h" nm_copy_sd "src/basic/fs-util.c" nm_copy_sd "src/basic/fs-util.h" nm_copy_sd "src/basic/hash-funcs.c" nm_copy_sd "src/basic/hash-funcs.h" nm_copy_sd "src/basic/hashmap.c" nm_copy_sd "src/basic/hashmap.h" nm_copy_sd "src/basic/hexdecoct.c" nm_copy_sd "src/basic/hexdecoct.h" nm_copy_sd "src/basic/hostname-util.c" nm_copy_sd "src/basic/hostname-util.h" nm_copy_sd "src/basic/in-addr-util.c" nm_copy_sd "src/basic/in-addr-util.h" nm_copy_sd "src/basic/io-util.c" nm_copy_sd "src/basic/io-util.h" nm_copy_sd "src/basic/list.h" nm_copy_sd "src/basic/log.h" nm_copy_sd "src/basic/macro.h" nm_copy_sd "src/basic/mempool.h" nm_copy_sd "src/basic/mempool.c" nm_copy_sd "src/basic/parse-util.c" nm_copy_sd "src/basic/parse-util.h" nm_copy_sd "src/basic/path-util.c" nm_copy_sd "src/basic/path-util.h" nm_copy_sd "src/basic/prioq.h" nm_copy_sd "src/basic/prioq.c" nm_copy_sd "src/basic/process-util.h" nm_copy_sd "src/basic/process-util.c" nm_copy_sd "src/basic/random-util.c" nm_copy_sd "src/basic/random-util.h" nm_copy_sd "src/basic/refcnt.h" nm_copy_sd "src/basic/set.h" nm_copy_sd "src/basic/signal-util.h" nm_copy_sd_shared "src/basic/siphash24.c" nm_copy_sd_shared "src/basic/siphash24.h" nm_copy_sd "src/basic/socket-util.c" nm_copy_sd "src/basic/socket-util.h" nm_copy_sd "src/basic/sparse-endian.h" nm_copy_sd "src/basic/stdio-util.h" nm_copy_sd "src/basic/string-table.c" nm_copy_sd "src/basic/string-table.h" nm_copy_sd "src/basic/string-util.c" nm_copy_sd "src/basic/string-util.h" nm_copy_sd "src/basic/strv.c" nm_copy_sd "src/basic/strv.h" nm_copy_sd "src/basic/time-util.c" nm_copy_sd "src/basic/time-util.h" nm_copy_sd "src/basic/umask-util.h" nm_copy_sd_shared "src/basic/unaligned.h" nm_copy_sd "src/basic/utf8.c" nm_copy_sd "src/basic/utf8.h" nm_copy_sd "src/basic/util.c" nm_copy_sd "src/basic/util.h" nm_copy_sd "src/libsystemd-network/arp-util.c" nm_copy_sd "src/libsystemd-network/arp-util.h" nm_copy_sd "src/libsystemd-network/dhcp6-internal.h" nm_copy_sd "src/libsystemd-network/dhcp6-lease-internal.h" nm_copy_sd "src/libsystemd-network/dhcp6-network.c" nm_copy_sd "src/libsystemd-network/dhcp6-option.c" nm_copy_sd "src/libsystemd-network/dhcp6-protocol.h" nm_copy_sd "src/libsystemd-network/dhcp-identifier.c" nm_copy_sd "src/libsystemd-network/dhcp-identifier.h" nm_copy_sd "src/libsystemd-network/dhcp-internal.h" nm_copy_sd "src/libsystemd-network/dhcp-lease-internal.h" nm_copy_sd "src/libsystemd-network/dhcp-network.c" nm_copy_sd "src/libsystemd-network/dhcp-option.c" nm_copy_sd "src/libsystemd-network/dhcp-packet.c" nm_copy_sd "src/libsystemd-network/dhcp-protocol.h" nm_copy_sd "src/libsystemd-network/lldp-internal.h" nm_copy_sd "src/libsystemd-network/lldp-neighbor.c" nm_copy_sd "src/libsystemd-network/lldp-neighbor.h" nm_copy_sd "src/libsystemd-network/lldp-network.c" nm_copy_sd "src/libsystemd-network/lldp-network.h" nm_copy_sd "src/libsystemd-network/network-internal.c" nm_copy_sd "src/libsystemd-network/network-internal.h" nm_copy_sd "src/libsystemd-network/sd-dhcp6-client.c" nm_copy_sd "src/libsystemd-network/sd-dhcp6-lease.c" nm_copy_sd "src/libsystemd-network/sd-dhcp-client.c" nm_copy_sd "src/libsystemd-network/sd-dhcp-lease.c" nm_copy_sd "src/libsystemd-network/sd-ipv4ll.c" nm_copy_sd "src/libsystemd-network/sd-ipv4acd.c" nm_copy_sd "src/libsystemd-network/sd-lldp.c" nm_copy_sd "src/libsystemd/sd-event/sd-event.c" nm_copy_sd "src/libsystemd/sd-id128/id128-util.c" nm_copy_sd "src/libsystemd/sd-id128/id128-util.h" nm_copy_sd "src/libsystemd/sd-id128/sd-id128.c" nm_copy_sd "src/shared/dns-domain.c" nm_copy_sd "src/shared/dns-domain.h" nm_copy_sd "src/systemd/_sd-common.h" nm_copy_sd "src/systemd/sd-dhcp6-client.h" nm_copy_sd "src/systemd/sd-dhcp6-lease.h" nm_copy_sd "src/systemd/sd-dhcp-client.h" nm_copy_sd "src/systemd/sd-dhcp-lease.h" nm_copy_sd "src/systemd/sd-event.h" nm_copy_sd "src/systemd/sd-ndisc.h" nm_copy_sd "src/systemd/sd-id128.h" nm_copy_sd "src/systemd/sd-ipv4acd.h" nm_copy_sd "src/systemd/sd-ipv4ll.h" nm_copy_sd "src/systemd/sd-lldp.h"
* | devices/test: reapply commit 5c6a382d4d2981375ec40d09b40a533b88909865Francesco Giudici2017-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit was accidentally reverted during systemd code merge from upstream. devices/test: give more time to dad checking in test-arping # random seed: R02Sc708af827453d4ace33cd27ffd3d7f0b 1..2 # Start of arping tests ** NetworkManager:ERROR:src/devices/tests/test-arping.c:95:test_arping_common: assertion failed (nm_arping_manager_check_address (manager, info->addresses[i]) == info->expected_result[i]): (1 == 0) ok 1 /arping/1 PASS: src/devices/tests/test-arping 1 /arping/1 ./tools/run-nm-test.sh: line 193: 2836 Aborted "${NMTST_DBUS_RUN_SESSION[@]}" "$TEST" "$@" # NetworkManager:ERROR:src/devices/tests/test-arping.c:95:test_arping_common: assertion failed (nm_arping_manager_check_address (manager, info->addresses[i]) == info->expected_result[i]): (1 == 0) ERROR: src/devices/tests/test-arping - too few tests run (expected 2, got 1) ERROR: src/devices/tests/test-arping - exited with status 134 (terminated by signal 6?) Fixes: 8c0dfd718883d3e6bc510cf4105c136f345755f4
* | dhcp: systemd: support the hostname propertyBeniamino Galvani2017-12-131-0/+8
| | | | | | | | Send the FQDN option when a hostname is set.
* | build: add initial support for meson build systemIñigo Martínez2017-12-1365-0/+5208
| | | | | | | | | | | | | | | | | | | | meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools. [thaller@redhat.com: rebased patch and adjusted for iwd support] https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00022.html
* | wifi: remove unused variables from iwd deviceThomas Haller2017-12-131-2/+0
| |
* | wifi: add initial support for iwd Wi-Fi damonThomas Haller2017-12-1313-133/+2703
|\ \ | | | | | | | | | | | | | | | https://mail.gnome.org/archives/networkmanager-list/2017-November/msg00037.html https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00004.html https://mail.gnome.org/archives/networkmanager-list/2017-December/msg00028.html
| * | wifi: downgrade logging level and support reloading "wifi-backend" configurationThomas Haller2017-12-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NM_CONFIG_GET_DATA_ORIG is the configuration that was loaded the first time. NM_CONFIG_GET_DATA is the currently loaded one. Sometimes we want to always stick to the original configuration, if we don't support reloading the parameter (for example main.plugins, because it would be cumbersome to properly implementing loading/unloading setting plugins. In this case however, we can allow reloading the configuration just fine. Of course, this only matters, if the device appears after the configuration is reloaded, for example by reloading the driver. Also, don't log any warnings, unless necessary.
| * | devices/wifi: Register an IWD PSK agent on dbusAndrew Zaborowski2017-12-133-1/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the PSK agent support to support PSK networks. Note that the PSK itself will be saved by IWD on the first successful connection to the network and will not be updated when it is changed by the user on the NM side, this still needs fixing like a bunch of other problems. [bgalvani@redhat.com: fix checking return value of nm_utils_random_bytes()]
| * | devices/wifi: Add the wifi-backend config optionAndrew Zaborowski2017-12-132-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | Let the config file select between creating classes of NMDeviceWifi (for the usual wpa_supplicant based devices) and NMDeviceIwd depending on the new NetworkManager.conf setting. [bgalvani@redhat.com: fix leaking @backend in create_device()]
| * | devices/wifi: Track IWD devices, match to NMDeviceIwd objectsAndrew Zaborowski2017-12-135-1/+447
| | | | | | | | | | | | | | | | | | Add the NMIwdManager singleton to be responsible for matching NMDeviceIwd objects created from platform devices, to IWD Device dbus objects when they appear/disappear.
| * | devices/wifi: Add NMDeviceIwd class to support IWD backendAndrew Zaborowski2017-12-134-0/+1859
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is very similar to NMDeviceWifi but simplified to remove the things currently unsupported and with calls to nm_platform_wifi_* and nm_supplicant_* replaced with IWD DBus API calls. Only unsecured infrastructure-mode networks are supported here. [bgalvani@redhat.com: fix compilation error after rebase for NMActRequestGetSecretsCallId] [thaller@redhat.com: don't use _() macro strings server side. Translating strings only makes sense for clients that set environment variables accordingly.]
| * | devices/wifi: Move is_manf_default_ssid to nm-wifi-utils.cAndrew Zaborowski2017-12-133-34/+36
| | | | | | | | | | | | Move the function for easier code reuse.
| * | devices/wifi: Move AP list utilities to nm-wifi-ap.cAndrew Zaborowski2017-12-133-96/+108
|/ / | | | | | | Move three functions for easier code reuse.
* | systemd: merge branch systemd into masterThomas Haller2017-12-13114-232/+837
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | Systemd instroduces a macro _fallthrough_, see https://github.com/systemd/systemd/pull/7389. However, it does not yet seem conclusive how to handle this properly in ever situation. While shared/nm-utils/siphash24.c makes use of the new macro, don't do that in our fork. siphash24.h does not include all systemd headers, hence _fallthrough_ is not defined. We could re-implement it as _nm_fallthrough, but given the open questions, that doesn't seem the
| * systemd: update code from upstream (2017-12-13)Thomas Haller2017-12-13110-228/+827
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git on 2017-12-13, git commit 18a121f9b462e2241c4a590f0a47f5351cd47e0f. ====== SYSTEMD_DIR=../systemd COMMIT=18a121f9b462e2241c4a590f0a47f5351cd47e0f ( cd "$SYSTEMD_DIR" git checkout "$COMMIT" git reset --hard git clean -fdx ) git ls-files :/src/systemd/src/ \ :/shared/nm-utils/siphash24.c \ :/shared/nm-utils/siphash24.h \ :/shared/nm-utils/unaligned.h | \ xargs -d '\n' rm -f nm_copy_sd() { mkdir -p "./src/systemd/$(dirname "$1")" cp "$SYSTEMD_DIR/$1" "./src/systemd/$1" } nm_copy_sd_shared() { mkdir -p "./shared/nm-utils/" cp "$SYSTEMD_DIR/$1" "./shared/nm-utils/${1##*/}" } nm_copy_sd "src/basic/alloc-util.c" nm_copy_sd "src/basic/alloc-util.h" nm_copy_sd "src/basic/async.h" nm_copy_sd "src/basic/escape.c" nm_copy_sd "src/basic/escape.h" nm_copy_sd "src/basic/ether-addr-util.c" nm_copy_sd "src/basic/ether-addr-util.h" nm_copy_sd "src/basic/extract-word.c" nm_copy_sd "src/basic/extract-word.h" nm_copy_sd "src/basic/fileio.c" nm_copy_sd "src/basic/fileio.h" nm_copy_sd "src/basic/fd-util.c" nm_copy_sd "src/basic/fd-util.h" nm_copy_sd "src/basic/fs-util.c" nm_copy_sd "src/basic/fs-util.h" nm_copy_sd "src/basic/hash-funcs.c" nm_copy_sd "src/basic/hash-funcs.h" nm_copy_sd "src/basic/hashmap.c" nm_copy_sd "src/basic/hashmap.h" nm_copy_sd "src/basic/hexdecoct.c" nm_copy_sd "src/basic/hexdecoct.h" nm_copy_sd "src/basic/hostname-util.c" nm_copy_sd "src/basic/hostname-util.h" nm_copy_sd "src/basic/in-addr-util.c" nm_copy_sd "src/basic/in-addr-util.h" nm_copy_sd "src/basic/io-util.c" nm_copy_sd "src/basic/io-util.h" nm_copy_sd "src/basic/list.h" nm_copy_sd "src/basic/log.h" nm_copy_sd "src/basic/macro.h" nm_copy_sd "src/basic/mempool.h" nm_copy_sd "src/basic/mempool.c" nm_copy_sd "src/basic/parse-util.c" nm_copy_sd "src/basic/parse-util.h" nm_copy_sd "src/basic/path-util.c" nm_copy_sd "src/basic/path-util.h" nm_copy_sd "src/basic/prioq.h" nm_copy_sd "src/basic/prioq.c" nm_copy_sd "src/basic/process-util.h" nm_copy_sd "src/basic/process-util.c" nm_copy_sd "src/basic/random-util.c" nm_copy_sd "src/basic/random-util.h" nm_copy_sd "src/basic/refcnt.h" nm_copy_sd "src/basic/set.h" nm_copy_sd "src/basic/signal-util.h" nm_copy_sd_shared "src/basic/siphash24.c" nm_copy_sd_shared "src/basic/siphash24.h" nm_copy_sd "src/basic/socket-util.c" nm_copy_sd "src/basic/socket-util.h" nm_copy_sd "src/basic/sparse-endian.h" nm_copy_sd "src/basic/stdio-util.h" nm_copy_sd "src/basic/string-table.c" nm_copy_sd "src/basic/string-table.h" nm_copy_sd "src/basic/string-util.c" nm_copy_sd "src/basic/string-util.h" nm_copy_sd "src/basic/strv.c" nm_copy_sd "src/basic/strv.h" nm_copy_sd "src/basic/time-util.c" nm_copy_sd "src/basic/time-util.h" nm_copy_sd "src/basic/umask-util.h" nm_copy_sd_shared "src/basic/unaligned.h" nm_copy_sd "src/basic/utf8.c" nm_copy_sd "src/basic/utf8.h" nm_copy_sd "src/basic/util.c" nm_copy_sd "src/basic/util.h" nm_copy_sd "src/libsystemd-network/arp-util.c" nm_copy_sd "src/libsystemd-network/arp-util.h" nm_copy_sd "src/libsystemd-network/dhcp6-internal.h" nm_copy_sd "src/libsystemd-network/dhcp6-lease-internal.h" nm_copy_sd "src/libsystemd-network/dhcp6-network.c" nm_copy_sd "src/libsystemd-network/dhcp6-option.c" nm_copy_sd "src/libsystemd-network/dhcp6-protocol.h" nm_copy_sd "src/libsystemd-network/dhcp-identifier.c" nm_copy_sd "src/libsystemd-network/dhcp-identifier.h" nm_copy_sd "src/libsystemd-network/dhcp-internal.h" nm_copy_sd "src/libsystemd-network/dhcp-lease-internal.h" nm_copy_sd "src/libsystemd-network/dhcp-network.c" nm_copy_sd "src/libsystemd-network/dhcp-option.c" nm_copy_sd "src/libsystemd-network/dhcp-packet.c" nm_copy_sd "src/libsystemd-network/dhcp-protocol.h" nm_copy_sd "src/libsystemd-network/lldp-internal.h" nm_copy_sd "src/libsystemd-network/lldp-neighbor.c" nm_copy_sd "src/libsystemd-network/lldp-neighbor.h" nm_copy_sd "src/libsystemd-network/lldp-network.c" nm_copy_sd "src/libsystemd-network/lldp-network.h" nm_copy_sd "src/libsystemd-network/network-internal.c" nm_copy_sd "src/libsystemd-network/network-internal.h" nm_copy_sd "src/libsystemd-network/sd-dhcp6-client.c" nm_copy_sd "src/libsystemd-network/sd-dhcp6-lease.c" nm_copy_sd "src/libsystemd-network/sd-dhcp-client.c" nm_copy_sd "src/libsystemd-network/sd-dhcp-lease.c" nm_copy_sd "src/libsystemd-network/sd-ipv4ll.c" nm_copy_sd "src/libsystemd-network/sd-ipv4acd.c" nm_copy_sd "src/libsystemd-network/sd-lldp.c" nm_copy_sd "src/libsystemd/sd-event/sd-event.c" nm_copy_sd "src/libsystemd/sd-id128/id128-util.c" nm_copy_sd "src/libsystemd/sd-id128/id128-util.h" nm_copy_sd "src/libsystemd/sd-id128/sd-id128.c" nm_copy_sd "src/shared/dns-domain.c" nm_copy_sd "src/shared/dns-domain.h" nm_copy_sd "src/systemd/_sd-common.h" nm_copy_sd "src/systemd/sd-dhcp6-client.h" nm_copy_sd "src/systemd/sd-dhcp6-lease.h" nm_copy_sd "src/systemd/sd-dhcp-client.h" nm_copy_sd "src/systemd/sd-dhcp-lease.h" nm_copy_sd "src/systemd/sd-event.h" nm_copy_sd "src/systemd/sd-ndisc.h" nm_copy_sd "src/systemd/sd-id128.h" nm_copy_sd "src/systemd/sd-ipv4acd.h" nm_copy_sd "src/systemd/sd-ipv4ll.h" nm_copy_sd "src/systemd/sd-lldp.h"
* | macros: add _nm_fallthrough macroThomas Haller2017-12-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Systemd introduced a _fallthrough_ macro in https://github.com/systemd/systemd/pull/7389. There might still be some issue with it, but as I am going to re-import the latest systemd code, we get them too. We need it, because "shared/nm-utils/siphash24.c" will use it too, and that source file does not include the other systemd macros. So, we will need to re-define it.
* | devices/test: give more time to dad checking in test-arpingFrancesco Giudici2017-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | # random seed: R02Sc708af827453d4ace33cd27ffd3d7f0b 1..2 # Start of arping tests ** NetworkManager:ERROR:src/devices/tests/test-arping.c:95:test_arping_common: assertion failed (nm_arping_manager_check_address (manager, info->addresses[i]) == info->expected_result[i]): (1 == 0) ok 1 /arping/1 PASS: src/devices/tests/test-arping 1 /arping/1 ./tools/run-nm-test.sh: line 193: 2836 Aborted "${NMTST_DBUS_RUN_SESSION[@]}" "$TEST" "$@" # NetworkManager:ERROR:src/devices/tests/test-arping.c:95:test_arping_common: assertion failed (nm_arping_manager_check_address (manager, info->addresses[i]) == info->expected_result[i]): (1 == 0) ERROR: src/devices/tests/test-arping - too few tests run (expected 2, got 1) ERROR: src/devices/tests/test-arping - exited with status 134 (terminated by signal 6?)