summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* l3cfg: implement IPv4 DAD/ACD (address collision detection) in NML3Cfgth/l3cfg-6-acdThomas Haller2020-09-033-108/+1884
| | | | | | | | | | | | | | | | | | | Currently, NMDevice does ACD. It intercepts certain NMIP4Config instances, and tries to perform ACD on the addresses. I think this functionality should be handled by NML3Cfg instead. For one, NML3Cfg sees all configurations, and can perform ACD for all (relevant) addresses. Also, it moves logic away from NMDevice and makes the functionality available without an NMDevice. As such, it also will allow that independent "controllers" contribute NML3ConfigData instances and ACD will performed for all of them (as requested). This will be our implementation for IPv4 ACD (https://tools.ietf.org/html/rfc5227) based on nettools' n-acd library. The code is not actually tested yes, because NMDevice did not yet switch over to use NML3Cfg. Once that happens, surely issues with this patch will be found that will need fixing.
* platform: add nm_platform_ip4_address_addr_to_hash() helperThomas Haller2020-09-032-0/+39
| | | | | This will only have one particular use, from NNL3Cfg. However, it seems general enough to place it in "nm-platform.h".
* initrd/tests: fix memleak in test_dhcp_vendor_class_id()Thomas Haller2020-09-031-1/+3
| | | | | | | Having leaks in the tests, breaks running the test under valgrind. There must be no leaks. Fixes: c056cb9306be ('initrd: parse 'rd.net.dhcp.vendor-class' kernel cmdline arg')
* all: replace cleanup macro "gs_free_slist" by "nm_auto_free_slist"Thomas Haller2020-09-022-6/+6
|
* all: replace cleanup macro "gs_unref_keyfile" by "nm_auto_unref_keyfile"Thomas Haller2020-09-027-19/+19
|
* core: log message about secret-key version and filenameThomas Haller2020-09-021-5/+14
|
* shared: rename "gs_local_option_context" to "nm_auto_free_option_context"Thomas Haller2020-09-021-1/+1
| | | | | | | | | The "gs_*" macros originate from the (no longer existing) libgsystem library. We still have them, because so far we didn't go through the effort of renaming the API. Aside that oddity, our cleanup API is called "nm_auto*". There is no need to add new API with the old name.
* initrd: fix memory leakAntonio Cardace2020-09-011-1/+1
| | | | | Signed-off-by: Antonio Cardace <acardace@redhat.com> Fixes: 9f9609555d1c ('initrd: add configuration generator')
* initrd: parse 'rd.net.dhcp.vendor-class' kernel cmdline argac/dhcpclass-initrdAntonio Cardace2020-09-012-0/+53
| | | | | | | | | This arguments makes NM set the ipv4.dhcp-vendor-class-identifier property for all connections. https://bugzilla.redhat.com/show_bug.cgi?id=1872299 Signed-off-by: Antonio Cardace <acardace@redhat.com>
* core: add 'dhcp-vendor-class-identifier' validation functionAntonio Cardace2020-09-011-7/+4
| | | | | | So that it can be reused. Signed-off-by: Antonio Cardace <acardace@redhat.com>
* device: fix autoactivating virtual devices after a failureBeniamino Galvani2020-08-311-0/+5
| | | | | | | | | | | | | | | | | | | When a virtual device fails, its state goes to FAIL and then DISCONNECTED. In DISCONNECTED we call schedule_activate_check() to schedule an auto-activation if needed. We also schudule the deletion of the link through delete_on_deactivate_check_and_schedule(). The auto-activation attempt fails because the link deletion unmanages the device; as a result, the device doesn't try to auto-activate again. To fix this: - don't allow the device to auto-activate if the device deletion is pending; - check again if the device can be auto-activated after its deletion. https://bugzilla.redhat.com/show_bug.cgi?id=1818697 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/613
* dhcp: workaround "maybe-uninitialized" in dhcp_event_cb()Thomas Haller2020-08-281-1/+1
| | | | | | | | | | | | | | With LTO we get a compiler warning: src/dhcp/nm-dhcp-systemd.c: In function dhcp_event_cb: src/dhcp/nm-dhcp-systemd.c:554: error: lease may be used uninitialized in this function [-Werror=maybe-uninitialized] 554 | r = sd_dhcp_lease_get_server_identifier (lease, &addr); | src/dhcp/nm-dhcp-systemd.c:528: note: lease was declared here 528 | sd_dhcp_lease *lease; | Fixes: 7f217d0345f5 ('core: honor the ipv4.dhcp-reject-servers property')
* device: fix casting pointer to enum for sriov_reset_on_deactivate_cb()Thomas Haller2020-08-281-2/+2
| | | | | | | | | | Avoids a compiler warning: ../src/devices/nm-device.c:16079:26: error: cast to smaller integer type 'NMDeviceStateReason' from 'gpointer' (aka 'void *') [-Werror,-Wvoid-pointer-to-enum-cast] deactivate_ready (self, (NMDeviceStateReason) reason); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 121c58f0c48d ('core: set number of SR-IOV VFs asynchronously')
* core/trivial: replace "XXX" markers with "TODO"Thomas Haller2020-08-274-7/+7
| | | | | | | | | "XXX" is used for tagging parts of code that still need work before merging a patch. If you want to highlight/mark a comment which is merged use either "TODO" or "FIXME". Of course, even "TODO" and "FIXME" should be avoided in favor of just doing/fixing it. Such things tend to never be done/fixed.
* dhcp: nettools: change event handler signatureBeniamino Galvani2020-08-261-6/+4
|
* core: honor the ipv4.dhcp-reject-servers propertyBeniamino Galvani2020-08-2612-2/+122
|
* all: add ipv4.dhcp-reject-servers propertyBeniamino Galvani2020-08-264-8/+30
| | | | | | Add a new dhcp-reject-servers property to the ipv4 setting, that allows specifying a list of server-ids from which offers should be rejected.
* dhcp: implement dhcp-vendor-class-identifier option for systemd's DHCPAntonio Cardace2020-08-261-0/+19
| | | | | | | client https://bugzilla.redhat.com/show_bug.cgi?id=1871042 Signed-off-by: Antonio Cardace <acardace@redhat.com>
* dhcp: implement dhcp-vendor-class-identifier option for internal DHCP clientAntonio Cardace2020-08-261-0/+20
| | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1871042 Signed-off-by: Antonio Cardace <acardace@redhat.com>
* core: add support for dhcpv4 vendor class identifier optionAntonio Cardace2020-08-267-16/+96
| | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1871042 Signed-off-by: Antonio Cardace <acardace@redhat.com>
* ifcfg-rh: add support for the DHCP_VENDOR_CLASS_IDENTIFIER optionAntonio Cardace2020-08-264-1/+12
| | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1871042 Signed-off-by: Antonio Cardace <acardace@redhat.com>
* dns: add new "rc-manager=auto" modeThomas Haller2020-08-242-7/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new `main.rc-manager=auto` setting, that favours to use systemd-resolved (and not touch "/etc/resolv.conf" but configure it via D-Bus), or falls back to `resolvconf`/`netconfig` binaries if they are installed and enabled at compile time. As final fallback use "symlink", like before. Note that on Fedora there is no "openresolv" package ([1]). Instead, "systemd" package provides "/usr/sbin/resolvconf" as a wrapper for systemd-resolved's "resolvectl". On such a system the fallback to resolvconf is always wrong, because NetworkManager should either talk to systemd-resolved directly or not but never call "/usr/sbin/resolvconf". So, the special handling for resolvconf and netconfig is only done if NetworkManager was build with these applications explicitly enabled. Note that SUSE builds NetworkManager with --with-netconfig=yes --with-config-dns-rc-manager-default=netconfig and the new option won't be used there either. But of course, netconfig already does all the right things on SUSE. [1] https://bugzilla.redhat.com/show_bug.cgi?id=668153 Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com>
* dns: add fixme comment to not block while writing to resolvconf/netconfigThomas Haller2020-08-241-0/+4
| | | | | | Arguably, a fixme comment isn't useful. It would be better to fix it. On the other hand, nowadays these modes are not very popular and usually not used. If somebody cares, please provide a patch.
* dhcp: nettools: parse some missing optionbg/nettools-optionsBeniamino Galvani2020-08-241-0/+38
| | | | | | | | | | Add support for the following options to the nettool client: - Network Information Service Domain (40) - Network Information Servers (41) - NetBIOS over TCP/IP Name Server (44) https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/592
* dhcp: nettools: use generic function to parse address listsBeniamino Galvani2020-08-241-12/+19
|
* platform: workaround for old kernels that don't support ↵Thomas Haller2020-08-215-5/+29
| | | | | | | | IFLA_BR_VLAN_STATS_ENABLED The kernel of Ubuntu 16.04 doesn't support IFLA_BR_VLAN_STATS_ENABLED. If we want to run on such old kernels (which we probably do), we need to detect that, and act accordingly.
* platform/tests: add nmtstp_kernel_support_get()Thomas Haller2020-08-212-0/+19
|
* platform: extend nm_platform_kernel_support_get() and use atomic operations ↵Thomas Haller2020-08-211-6/+16
| | | | | | | | | | | to access result Add nm_platform_kernel_support_get_full() to allow fetching the support state without setting it to the compile time default. Also, use g_atomic_int_get() to access _nm_platform_kernel_support_state values. We should not access static variables without synchronization. Better get it correct in any case than fast.
* platform/tests: remove unused argument "out_not_supported" from ↵Thomas Haller2020-08-213-14/+5
| | | | nmtstp_link_bridge_add()
* platform: use defines from libnm-core for setting defaults values for ↵Thomas Haller2020-08-211-3/+3
| | | | nm_platform_lnk_bridge_default
* platform: fix default for bridge setting "mcast_snooping"Thomas Haller2020-08-211-1/+1
| | | | | | The value defaults to TRUE. Also, use the #define for it. Fixes: 58847f85a4c1 ('platform: use netlink for configuring bridge settings'):
* core: use defines for sysfs values of bridge attributes (group-address and ↵Thomas Haller2020-08-211-3/+3
| | | | vlan-protocol)
* platform: use netlink for configuring bridge settingsSayed Shah2020-08-206-53/+180
| | | | | NMDeviceBridge is currently using sysfs. The plan is to use netlink in in the future
* build: fix generating "NetworkManager.ver" with LTOThomas Haller2020-08-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use a linker version script "NetworkManager.ver", to hide symbols from NetworkManager that are not used. That is important due to our habit of using internal helper libraries that we link statically everywhere, without handpicking the symbols we actually need. We want the tooling to get rid of unnecessary symbols. However, NetworkManager loads shared libraries for settings and device plugins. These libraries require symbols from the NetworkManager binary, but which one depends on build options. Hence, we also generate "NetworkManager.ver" by the "tools/create-exports-NetworkManager.sh" script. For that the script uses "nm" to find symbols that are undefined in the plugin libraries but defined in NetworkManager. With autotools the script looked at "./src/.libs/libNetworkManager.a" to find the present symbols. Note that for meson that already didn't work, and we build instead an intermediate NetworkManager binary first (with all symbols exposed). With LTO, "nm" doesn't find all symbols in "./src/.libs/libNetworkManager.a", and consequently they are not exported and dropped/hidden. This also causes unit tests to fail with LTO, because our test script "tools/check-exports.sh" catches such bugs. Fix that by also with autotools generate a complete "NetworkManager-all-sym" binary that is used to generate "NetworkManager.ver", before rebuilding "NetworkManager" again.
* core: avoid deprecated matchfilecon SELinux API instead of selabelThomas Haller2020-08-171-15/+32
| | | | | | | | The matchfilecon API is deprecated for a very long time. Since selinux 3.1 the functions are also marked as deprecated in the header, which causes compiler warnings and build failures. Update the code to use selabel API instead.
* all: avoid wrong compiler warning about uninitalized variables with LTOThomas Haller2020-08-174-5/+8
| | | | | | Seems with LTO the compiler can sometimes think that thes variables are uninitialized. Usually those code paths are only after an assertion was hit (g_return*()), but we still need to workaround the warning.
* platform: set default values for NMPlatformLnkBridge if unspecified on netlinkThomas Haller2020-08-171-0/+18
| | | | | | | | Older kernels may not support or send all bridge options in the netlink message. In case the parameter is missing, set the default value. Note that there may be future cases where we need to encode whether the option is present or not. Currently we don't express that.
* platform/tests: ignore failure for adding bridge with iproute2Thomas Haller2020-08-171-12/+77
| | | | | | | | | | | | | | Older versions of iproute2 (Ubuntu 16.04) don't support all the requested bridge options. We need to gracefully ignore a failure and try with our own implementation. While doing that, only set the command line arguments if they are necessary (that is, if they requested value is not the default already). Luckily, Ubuntu 16.04's kernel supports these properties just fine, so we can avoid complicated compatibility code to cope with missing kernel support. It's really just an iproute2 limitation and affects only the tests.
* platform: add NMP_OBJECT_CAST_LNK_BRIDGE() helper macroThomas Haller2020-08-171-0/+1
|
* platform: add support for configuring bridge settings via netlink (2)Sayed Shah2020-08-146-25/+190
| | | | | | | NMDeviceBridge is currently using sysfs. The plan is to use netlink in in the future. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/601
* settings: suppress wrong warning about wait-device-timeout for devices that ↵Thomas Haller2020-08-131-4/+6
| | | | | | | | | | | | | | are still busy Imagine we wait for a device, the device appears and starts activating. That might take a while (during which it has a pending action). In the meantime, the "connection.wait-device-timeout" timeout expires. Now we want to log a warning about profiles that don't have their device upon timeout. However, that the device is still busy at that point is irrelevant. Skip logging a message about those profiles. Fixes: 3df662f534c4 ('settings: rework wait-device-timeout handling and consider device compatibility')
* systemd: merge branch systemd into masterThomas Haller2020-08-131-1/+1
|\
| * systemd: update code from upstream (2020-08-11)Thomas Haller2020-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git. ====== SYSTEMD_DIR=../systemd COMMIT=c53da7ed02a5d732c9449f79c19675b90a6032e3 ( cd "$SYSTEMD_DIR" git checkout "$COMMIT" git reset --hard git clean -fdx ) git ls-files -z :/src/systemd/src/ \ :/shared/systemd/src/ \ :/shared/nm-std-aux/unaligned.h | \ xargs -0 rm -f nm_copy_sd_shared() { mkdir -p "./shared/systemd/$(dirname "$1")" cp "$SYSTEMD_DIR/$1" "./shared/systemd/$1" } nm_copy_sd_core() { mkdir -p "./src/systemd/$(dirname "$1")" cp "$SYSTEMD_DIR/$1" "./src/systemd/$1" } nm_copy_sd_stdaux() { mkdir -p "./shared/nm-std-aux/" cp "$SYSTEMD_DIR/$1" "./shared/nm-std-aux/${1##*/}" } nm_copy_sd_core "src/libsystemd-network/arp-util.c" nm_copy_sd_core "src/libsystemd-network/arp-util.h" nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.c" nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.h" nm_copy_sd_core "src/libsystemd-network/dhcp-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp-lease-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp-network.c" nm_copy_sd_core "src/libsystemd-network/dhcp-option.c" nm_copy_sd_core "src/libsystemd-network/dhcp-packet.c" nm_copy_sd_core "src/libsystemd-network/dhcp-protocol.h" nm_copy_sd_core "src/libsystemd-network/dhcp6-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp6-lease-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp6-network.c" nm_copy_sd_core "src/libsystemd-network/dhcp6-option.c" nm_copy_sd_core "src/libsystemd-network/dhcp6-protocol.h" nm_copy_sd_core "src/libsystemd-network/lldp-internal.h" nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.c" nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.h" nm_copy_sd_core "src/libsystemd-network/lldp-network.c" nm_copy_sd_core "src/libsystemd-network/lldp-network.h" nm_copy_sd_core "src/libsystemd-network/network-internal.c" nm_copy_sd_core "src/libsystemd-network/network-internal.h" nm_copy_sd_core "src/libsystemd-network/sd-dhcp-client.c" nm_copy_sd_core "src/libsystemd-network/sd-dhcp-lease.c" nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-client.c" nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-lease.c" nm_copy_sd_core "src/libsystemd-network/sd-ipv4acd.c" nm_copy_sd_core "src/libsystemd-network/sd-ipv4ll.c" nm_copy_sd_core "src/libsystemd-network/sd-lldp.c" nm_copy_sd_core "src/libsystemd/sd-event/event-source.h" nm_copy_sd_core "src/libsystemd/sd-event/event-util.c" nm_copy_sd_core "src/libsystemd/sd-event/event-util.h" nm_copy_sd_core "src/libsystemd/sd-event/sd-event.c" nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.c" nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.h" nm_copy_sd_core "src/libsystemd/sd-id128/sd-id128.c" nm_copy_sd_core "src/systemd/_sd-common.h" nm_copy_sd_core "src/systemd/sd-dhcp-client.h" nm_copy_sd_core "src/systemd/sd-dhcp-lease.h" nm_copy_sd_core "src/systemd/sd-dhcp-option.h" nm_copy_sd_core "src/systemd/sd-dhcp6-client.h" nm_copy_sd_core "src/systemd/sd-dhcp6-lease.h" nm_copy_sd_core "src/systemd/sd-dhcp6-option.h" nm_copy_sd_core "src/systemd/sd-event.h" nm_copy_sd_core "src/systemd/sd-id128.h" nm_copy_sd_core "src/systemd/sd-ipv4acd.h" nm_copy_sd_core "src/systemd/sd-ipv4ll.h" nm_copy_sd_core "src/systemd/sd-lldp.h" nm_copy_sd_core "src/systemd/sd-ndisc.h" nm_copy_sd_shared "src/basic/alloc-util.c" nm_copy_sd_shared "src/basic/alloc-util.h" nm_copy_sd_shared "src/basic/async.h" nm_copy_sd_shared "src/basic/cgroup-util.h" nm_copy_sd_shared "src/basic/env-file.c" nm_copy_sd_shared "src/basic/env-file.h" nm_copy_sd_shared "src/basic/env-util.c" nm_copy_sd_shared "src/basic/env-util.h" nm_copy_sd_shared "src/basic/errno-util.h" nm_copy_sd_shared "src/basic/escape.c" nm_copy_sd_shared "src/basic/escape.h" nm_copy_sd_shared "src/basic/ether-addr-util.c" nm_copy_sd_shared "src/basic/ether-addr-util.h" nm_copy_sd_shared "src/basic/extract-word.c" nm_copy_sd_shared "src/basic/extract-word.h" nm_copy_sd_shared "src/basic/fd-util.c" nm_copy_sd_shared "src/basic/fd-util.h" nm_copy_sd_shared "src/basic/fileio.c" nm_copy_sd_shared "src/basic/fileio.h" nm_copy_sd_shared "src/basic/format-util.c" nm_copy_sd_shared "src/basic/format-util.h" nm_copy_sd_shared "src/basic/fs-util.c" nm_copy_sd_shared "src/basic/fs-util.h" nm_copy_sd_shared "src/basic/hash-funcs.c" nm_copy_sd_shared "src/basic/hash-funcs.h" nm_copy_sd_shared "src/basic/hashmap.c" nm_copy_sd_shared "src/basic/hashmap.h" nm_copy_sd_shared "src/basic/hexdecoct.c" nm_copy_sd_shared "src/basic/hexdecoct.h" nm_copy_sd_shared "src/basic/hostname-util.c" nm_copy_sd_shared "src/basic/hostname-util.h" nm_copy_sd_shared "src/basic/in-addr-util.c" nm_copy_sd_shared "src/basic/in-addr-util.h" nm_copy_sd_shared "src/basic/io-util.c" nm_copy_sd_shared "src/basic/io-util.h" nm_copy_sd_shared "src/basic/list.h" nm_copy_sd_shared "src/basic/log.h" nm_copy_sd_shared "src/basic/macro.h" nm_copy_sd_shared "src/basic/memory-util.c" nm_copy_sd_shared "src/basic/memory-util.h" nm_copy_sd_shared "src/basic/mempool.c" nm_copy_sd_shared "src/basic/mempool.h" nm_copy_sd_shared "src/basic/missing_fcntl.h" nm_copy_sd_shared "src/basic/missing_random.h" nm_copy_sd_shared "src/basic/missing_socket.h" nm_copy_sd_shared "src/basic/missing_stat.h" nm_copy_sd_shared "src/basic/missing_syscall.h" nm_copy_sd_shared "src/basic/missing_type.h" nm_copy_sd_shared "src/basic/parse-util.c" nm_copy_sd_shared "src/basic/parse-util.h" nm_copy_sd_shared "src/basic/path-util.c" nm_copy_sd_shared "src/basic/path-util.h" nm_copy_sd_shared "src/basic/prioq.c" nm_copy_sd_shared "src/basic/prioq.h" nm_copy_sd_shared "src/basic/process-util.c" nm_copy_sd_shared "src/basic/process-util.h" nm_copy_sd_shared "src/basic/random-util.c" nm_copy_sd_shared "src/basic/random-util.h" nm_copy_sd_shared "src/basic/set.h" nm_copy_sd_shared "src/basic/signal-util.c" nm_copy_sd_shared "src/basic/signal-util.h" nm_copy_sd_shared "src/basic/siphash24.h" nm_copy_sd_shared "src/basic/socket-util.c" nm_copy_sd_shared "src/basic/socket-util.h" nm_copy_sd_shared "src/basic/sort-util.h" nm_copy_sd_shared "src/basic/sparse-endian.h" nm_copy_sd_shared "src/basic/stat-util.c" nm_copy_sd_shared "src/basic/stat-util.h" nm_copy_sd_shared "src/basic/stdio-util.h" nm_copy_sd_shared "src/basic/string-table.c" nm_copy_sd_shared "src/basic/string-table.h" nm_copy_sd_shared "src/basic/string-util.c" nm_copy_sd_shared "src/basic/string-util.h" nm_copy_sd_shared "src/basic/strv.c" nm_copy_sd_shared "src/basic/strv.h" nm_copy_sd_shared "src/basic/strxcpyx.c" nm_copy_sd_shared "src/basic/strxcpyx.h" nm_copy_sd_shared "src/basic/time-util.c" nm_copy_sd_shared "src/basic/time-util.h" nm_copy_sd_shared "src/basic/tmpfile-util.c" nm_copy_sd_shared "src/basic/tmpfile-util.h" nm_copy_sd_shared "src/basic/umask-util.h" nm_copy_sd_shared "src/basic/user-util.h" nm_copy_sd_shared "src/basic/utf8.c" nm_copy_sd_shared "src/basic/utf8.h" nm_copy_sd_shared "src/basic/util.c" nm_copy_sd_shared "src/basic/util.h" nm_copy_sd_shared "src/shared/dns-domain.c" nm_copy_sd_shared "src/shared/dns-domain.h" nm_copy_sd_shared "src/shared/web-util.c" nm_copy_sd_shared "src/shared/web-util.h" nm_copy_sd_stdaux "src/basic/unaligned.h"
* | initrd: always set "connection.wait-device-timeout" even if profile has no ↵Thomas Haller2020-08-121-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | interface-name set Since commit 3df662f534c4 ('settings: rework wait-device-timeout handling and consider device compatibility'), "connection.wait-device-timeout" works with profiles in general and doesn't require an interface-name set. Remove that restriction and let initrd generator create profiles that always wait.
* | settings: rework wait-device-timeout handling and consider device compatibilityThomas Haller2020-08-123-167/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A profile can configure "connection.wait-device-timeout" to indicate that startup complete is blocked until a suitable device around. This is useful for NetworkManager-wait-online and initrd mode. Previously, we looked at NMPlatform whether a link with matching interface-name was present. That is wrong because it cannot handle profiles that rely on "ethernet.mac-address" setting or other "match" settings. Also, the mere presence of the link does not yet mean that the NMDevice was created and ready. In fact, there is a race here: NMPlatform indicates that the device is ready (unblocking NMSettings), but there is no corresponding NMDevice yet which keeps NetworkManager busy to block startup complete. Rework this. Now, only check whether there is a compatible device for the profile. Since we wait for compatible devices, it works now not only for the interface name. Note that we do some optimizations so that we don't have to re-evaluate all profiles (w.r.t. all devices) whenever something on the device changes: we only care about this when all devices finally become ready. Also, we no longer start the timeout for "connection.wait-device-timeout" when the profile appears. Instead, there is one system-wide start time (NMSettingsPrivate.startup_complete_start_timestamp_msec). That simplifies code and makes sense: we start waiting when NetworkManager is starting, not when the profile gets added. Also, we wait for all profiles to become ready together.
* | settings: let NMSettings reference NMManagerThomas Haller2020-08-123-4/+45
| | | | | | | | | | | | | | | | | | | | | | NMSettings needs access to the list of all devices, which is tracked by NMManager. Of course, this ties NMSettings and NMManager closer together. Note that NMManager already owns a reference to NMSettings, so they are in fact related. The alternatives of just letting NMSettings reference NMManager (and vice versa) would be more complicated, and likely not help to simplify the code (on the contrary).
* | platform: add support for configuring bridge settings via netlinkSayed Shah2020-08-0711-4/+252
| | | | | | | | | | NMDeviceBridge is currently using sysfs. The plan is to use netlink in in the future
* | nmp-object: add space before parenthesesSayed Shah2020-08-071-25/+24
| |
* | l3cfg: change l3cd for-each macros to take pointers instead of variable namesThomas Haller2020-08-063-19/+19
| | | | | | | | | | | | | | | | | | It's not a big difference and unclear which is preferable. It however seems slighly clearer to require the user to provide a pointer, instead of a variable for which the macro itself takes the reference. It makes it clearer that the "iter" and "obj" arguments are modified by the macro.
* | shared: change NM_SWAP() macro to take pointer argumentsThomas Haller2020-08-064-5/+5
| | | | | | | | | | | | | | | | This makes the macro more function like. Also, taking a pointer makes it a bit clearer that this possibly changes the value. Of course, it's not a big difference to before, but this form seems slightly preferable to me.