summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* meson: bump up min version to 0.46 according to minimum requirementsac/meson_improvementsAntonio Cardace2019-12-231-1/+1
| | | | | | | | The following used functions: `compiler.has_link_argument`, `link_whole arg in declare_dependency`, `compiler.has_multi_link_argument` are present only from meson 0.46.
* meson: remove pid_t redefinitionAntonio Cardace2019-12-232-7/+0
| | | | | For some reason has_type() does not work correctly and causes redefinition of the type.
* meson: add additional debug CFLAGS to use the same ones autotools usesAntonio Cardace2019-12-231-0/+12
|
* meson: use has_link_argument() to check linker flags supportAntonio Cardace2019-12-231-1/+5
|
* po: update Polish (pl) translationPiotr Drąg2019-12-221-2060/+2193
| | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/373
* ifcfg-rh: remove calls to svUnsetAll()Thomas Haller2019-12-211-26/+2
| | | | | We no longer need to explicitly clear values. Those that we don't set, will be cleared automatically.
* ifcfg-rh: treat base name as numbered tag and fix detection of NETMASKThomas Haller2019-12-212-21/+37
| | | | | | | | | | | | | | | | | We call svFindFirstNumberedKey() to check whether we have any NETMASK set. Since commit 9085c5c3a9c2 ('ifcfg-rh: rename svFindFirstKeyWithPrefix() to svFindFirstNumberedKey() for finding NETMASK') that function would no longer find the "NETMASK" without number. Fix that, by letting nms_ifcfg_rh_utils_is_numbered_tag() return TRUE for the tag itself. This also makes more sense, because it matches our common understanding what numbered tags are. Adjust the other callers that don't want this behavior to explicitly check. Fixes: 9085c5c3a9c2 ('ifcfg-rh: rename svFindFirstKeyWithPrefix() to svFindFirstNumberedKey() for finding NETMASK')
* ifcfg-rh: merge branch 'th/ifcfg-unset-well-known-keys'Thomas Haller2019-12-2113-422/+816
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/367
| * ifcfg-rh: add index for O(1) access of variables in shvarFileThomas Haller2019-12-211-49/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, setting or getting a variable required to scan all lines. Note that frequently we would look up variables that didn't actually exist, which we could only determine after searching the entire list. Also, since we needed to handle having the same variable specified multiple times (where the last occurrence wins), we always had to search all keys and couldn't stop when finding the first key. Well, technically we could have searched in reverse order for the getter, but that wasn't done. For the setter we wanted to delete all but the last occurrences, so to find them, we really had to search them all. We want to support profiles with hundreds or thousands of addresses and routes. This does not scale well. Add an hash table to find the variables in constant time. Test this commit and the parent commit: $ git clean -fdx && CFLAGS=-O2 ./autogen.sh --with-more-asserts=0 && ./tools/run-nm-test.sh -m src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh && perf stat -r 50 -B src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh 1>/dev/null Before: Performance counter stats for 'src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh' (50 runs): 330.94 msec task-clock:u # 0.961 CPUs utilized ( +- 0.33% ) 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 1,081 page-faults:u # 0.003 M/sec ( +- 0.07% ) 1,035,923,116 cycles:u # 3.130 GHz ( +- 0.29% ) 1,800,084,022 instructions:u # 1.74 insn per cycle ( +- 0.01% ) 362,313,301 branches:u # 1094.784 M/sec ( +- 0.02% ) 6,259,421 branch-misses:u # 1.73% of all branches ( +- 0.13% ) 0.34454 +- 0.00116 seconds time elapsed ( +- 0.34% ) Now: Performance counter stats for 'src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh' (50 runs): 329.78 msec task-clock:u # 0.962 CPUs utilized ( +- 0.39% ) 0 context-switches:u # 0.000 K/sec 0 cpu-migrations:u # 0.000 K/sec 1,084 page-faults:u # 0.003 M/sec ( +- 0.05% ) 1,036,130,698 cycles:u # 3.142 GHz ( +- 0.13% ) 1,799,851,979 instructions:u # 1.74 insn per cycle ( +- 0.01% ) 360,374,338 branches:u # 1092.756 M/sec ( +- 0.01% ) 6,160,796 branch-misses:u # 1.71% of all branches ( +- 0.08% ) 0.34287 +- 0.00133 seconds time elapsed ( +- 0.39% ) So, not much difference. But this is not surprising, because test-ifcfg-rh loads and writes predominantly ifcfg files with few variables. The difference should be visible when having large files.
| * ifcfg-rh: rename svFindFirstKeyWithPrefix() to svFindFirstNumberedKey() for ↵Thomas Haller2019-12-213-7/+5
| | | | | | | | | | | | | | | | | | finding NETMASK svFindFirstKeyWithPrefix() only had one caller: to find whether there are any NETMASK variables set. NETMASK is a numbered variable, so we should only find variables that indeed follow the pattern. Since there was only one caller, rename and repurpose the function.
| * ifcfg-rh: remove explicit svUnsetValue() calls and rely on automatic removal ↵Thomas Haller2019-12-211-266/+89
| | | | | | | | | | | | of unvisited keys Part 2 of previous commit. See there.
| * ifcfg-rh: clear all untouched, known keys before writing ifcfg-rh fileThomas Haller2019-12-213-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we write a connection profile to ifcfg-rh file, we first load the possibly existing file and modify it. The purpose is to preserve variables that we don't know about, keep comments and preserve the order of the variables. Note that the writer sets a bunch of variables according to the profile's setting. At various places the writer would explicitly clear variables with svUnsetValue(). However, that was problematic: - we would not unset all variables that we care about. We really should not leave previous variables if they make no sense anymore for the profile. The only thing we want to preserve are entirely unknown keys and comments. Note that when the writer omits to clear an unset variable, it usually does so assuming that the reader would anyway ignore the key, become some other key renders it irrelevant. Given the complexity of the reader and writer, that is often not the case and hard to ensure. We might have simply forgotten a svUnsetValue(), which was an easy to make mistake and hard to find (because you'd have to test with a pre-existing profile that happens to contain that key, which leaves countless combinations for testing. That means, a profile written by the writter might be interpreted differently by the reader depending on which pre-existing keys were set. - it was cumbersome to explicitly call svUnsetValue(). Note that for numbered tags in particular we would iterate the keys trying to unset them. For example for addresses (like "IPADDR5") we would iterate over the first 256 IPADDR keys, trying to unset them. That is horrible. For one, it doesn't cover the case where there might be more than 256 addresses. Also, it adds a significant overhead every time. While writing a ifcfg file currently is O(n^2) because setting one key is O(l), with l being the number of keys/lines. So, if you set n keys in a file with l lines, you get O(n*l). Which is basically O(n^2), because the number of lines and the number of keys to set usually corresponds. So when setting 256 times IPADDR, the overall complexity was still O(n^2 + 256 * n) and didn't change. However, the 256 factor here can be very significant. We should not explicitly unset variables, we should always unset all known variables that we don't explicitly set. The svUnsetValue() calls are still there. They will be dropped next.
| * ifcfg-rh: add svUnsetDirtyWellknown() functionThomas Haller2019-12-212-0/+41
| | | | | | | | | | | | | | | | Helper function to remove all variables that are still dirty (not visited) and well-known. Also add svWriteFileWithoutDirtyWellknown() to clear the lines before persisting to disk.
| * ifcfg-rh: add functions to detect well-known ifcfg-rh keysThomas Haller2019-12-217-38/+467
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a lot of meta-data about how we handle ifcfg-rh. We will use this to prune/delete all variables that are not explicitly set (dirty) but also well-known. We could now easily emit a warning when an ifcfg-rh file contains unused key. We also could add more meta-data for each key. For example, we write different files (ifcfg- and keys- files). We could add flags to indicate that variables are valid in certain files. Currently that's not done. Also, for simple properties we could associate the key with the NMSetting property, and treat does generically, like keyfile does. Anyway, there are potentials. For now, we will use this to clear dirty variables.
| * ifcfg-rh: refactor is_numbered_tag() macro and make it a functionThomas Haller2019-12-213-46/+69
| | | | | | | | | | | | | | | | | | | | Previously, IS_NUMBERED_TAG() could only be called with a C literal. Add is_numbered_tag() which can be called with any C string. Also, IS_NUMBERED_TAG_PARSE() and IS_NUMBERED_TAG() didn't do exactly the same. I think they should. The only difference was if the number was larger than 2^63-1. Now IS_NUMBERED_TAG() starts ignoring such keys, which is fine.
| * ifcfg-rh: mark lines as non-dirty in shvarFile when we visit themThomas Haller2019-12-211-6/+21
| | | | | | | | | | | | By default, all lines are now marked as dirty. Whenever we modify/set a line, it becomes non-dirty. That will be used later to prune lines that are dirty, that is, not yet visited.
| * ifcfg-rh/trivial: rename nms_ifcfg_rh_utils_parse_unhandled_spec() helperThomas Haller2019-12-213-9/+9
| | | | | | | | The name didn't follow the scheme.
| * shared/glib: add compat implementation for g_hash_table_steal_extended()Thomas Haller2019-12-211-0/+28
|/
* core,libnm: merge branch 'th/capability-ovs-rh1785147'Thomas Haller2019-12-218-3/+112
|\ | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1785147 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/370
| * libnm: add nm_client_get_capabilities() to expose server CapabilitiesThomas Haller2019-12-213-1/+100
| | | | | | | | | | | | | | | | I hesitated to add this to libnm, because it's hardly used. However, we already fetch the property during GetManagedObjects(), we we should make it accessible, instead of requiring the user to make another D-Bus call.
| * libnm: handle boxed GType properties in nm_utils_g_param_spec_is_default()Thomas Haller2019-12-211-0/+1
| |
| * core: add and indicate NM_CAPABILITY_OVS capability on D-BusThomas Haller2019-12-214-2/+11
|/ | | | https://bugzilla.redhat.com/show_bug.cgi?id=1785147
* libnm: use designated initalizers for NMSriovVF and VFVlanThomas Haller2019-12-201-12/+16
|
* libnm: fix type annotation for nm_sriov_vf_get_vlan_ids()Thomas Haller2019-12-201-1/+1
| | | | | | | | Otherwise, this function cannot really be used via generated bindings. Also, it's the only way to actually retrieve the set vlan-ids, without it, you wouldn't know which ones are set. Fixes: a9b4532fa77d ('libnm-core: add SR-IOV setting')
* libnm: emit property changed signal when setting NM_CLIENT_DBUS_CONNECTIONThomas Haller2019-12-181-0/+2
|
* Merge branch 'ac/readline_fix_leaks'Antonio Cardace2019-12-183-15/+22
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/366
| * clients,libnm-core: zero-out memory used to store plain-text secretsAntonio Cardace2019-12-183-14/+17
| |
| * common: readline: fix memory leak of plain text secretAntonio Cardace2019-12-181-1/+5
|/ | | | | | | | After a user entered a secret it would get stored in the readline history data structure (in plain text) and eventually get leaked. This commit instructs readline to not store any secret in its history and fixes a non-related memory leak.
* dhcp: nettools: check return value of g_file_set_contents()Beniamino Galvani2019-12-181-6/+8
| | | | | | | | | | Found by covscan: NetworkManager-1.22.0/src/dhcp/nm-dhcp-nettools.c:945: check_return: Calling "g_file_set_contents" without checking return value (as is done elsewhere 16 out of 20 times). Fixes: 9f8951692822 ('dhcp: nettools: read/write lease files')
* shared: add missing va_end() to _nm_dbus_error_is()Beniamino Galvani2019-12-181-1/+3
| | | | | | | | | Found by covscan: NetworkManager-1.22.0/shared/nm-glib-aux/nm-dbus-aux.c:361: missing_va_end: va_end was not called for "ap". Fixes: ce36494c0a48 ('shared: add nm_dbus_error_is() helper')
* dhcp: nettools: fix parsing of search domains optionBeniamino Galvani2019-12-171-2/+2
| | | | | | | | 'first' was never modified and so the dot was never added. Fixes: 6adade6f21d5 ('dhcp: add nettools dhcp4 client') https://bugzilla.redhat.com/show_bug.cgi?id=1783981
* release: bump version to 1.23.1-dev after 1.22.0 release1.23.1-devThomas Haller2019-12-17129-1450/+3499
|\ | | | | | | | | | | | | | | | | | | After 1.22.0 is released, merge it back into master so that 1.22.0 is part of the history of master. That means, $ git log --first-parent master will also traverse 1.22.0 and 1.22-rc*. Also bump the micro version to 1.23.1-dev to indicate that this is after 1.22.0 is out.
| * libnm/secret-agent: remove unused variableThomas Haller2019-12-171-1/+0
| | | | | | | | Fixes: f0d3243f2ba9 ('libnm/secret-agent: fix race registering secret agent')
| * libnm/secret-agent: fix reseting timeout when registration completesThomas Haller2019-12-161-2/+1
| | | | | | | | Fixes: f0d3243f2ba9 ('libnm/secret-agent: fix race registering secret agent')
| * libnm: merge branch 'th/secret-agent-register-race'Thomas Haller2019-12-165-180/+353
| |\ | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1781084 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/364
| | * libnm/secret-agent: fix race registering secret agentThomas Haller2019-12-161-32/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When NetworkManager starts, NMSecretAgentOld gets a name-owner changed signal and registers right away. Especially since commit ce0e898fb476 ('libnm: refactor caching of D-Bus objects in NMClient') this hits a race where NetworkManager does not yet export the org.freedesktop.NetworkManager.AgentManager interface and the registration fails: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.NetworkManager.AgentManager” on object at path /org/freedesktop/NetworkManager/AgentManager Previously, when NMClient recevied a name-owner changed, that would block the main loop long enough to avoid the race. Note that NMClient has nothing to do with NMSecretAgentOld, however in practice all applications that use NMSecretAgentOld also use NMClient. While we should fix the race server-side, we also need to work around it in the client. Retry. Also, make the async request actually cancellable and actually honor the passed GCancellable. Check output: $ LIBNM_CLIENT_DEBUG=trace ./clients/cli/nmcli agent secret |& grep secret-agent libnm-dbus: <trace> [21399.04862] secret-agent[2f2af4ee102d7570]: create new instance libnm-dbus: <trace> [21399.04863] secret-agent[2f2af4ee102d7570]: init-sync libnm-dbus: <trace> [21404.08147] secret-agent[2f2af4ee102d7570]: name owner changed: (null) libnm-dbus: <trace> [21404.09085] secret-agent[2f2af4ee102d7570]: name owner changed: ":1.2504" libnm-dbus: <trace> [21404.09085] secret-agent[2f2af4ee102d7570]: register: starting asynchronous registration... libnm-dbus: <trace> [21404.09178] secret-agent[2f2af4ee102d7570]: register: registration failed with error "GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.NetworkManager.AgentManager” on object at path /org/freedesktop/NetworkManager/AgentManager". Retry in 0 msec... libnm-dbus: <trace> [21404.09178] secret-agent[2f2af4ee102d7570]: register: retry registration... libnm-dbus: <trace> [21404.09195] secret-agent[2f2af4ee102d7570]: register: registration failed with error "GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.NetworkManager.AgentManager” on object at path /org/freedesktop/NetworkManager/AgentManager". Retry in 4 msec... libnm-dbus: <trace> [21404.09236] secret-agent[2f2af4ee102d7570]: register: retry registration... [...] libnm-dbus: <trace> [21405.01782] secret-agent[2f2af4ee102d7570]: register: registration failed with error "GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.NetworkManager.AgentManager” on object at path /org/freedesktop/NetworkManager/AgentManager". Retry in 128 msec... libnm-dbus: <trace> [21405.03063] secret-agent[2f2af4ee102d7570]: register: retry registration... libnm-dbus: <trace> [21405.03068] secret-agent[2f2af4ee102d7570]: register: registration failed with error "GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.NetworkManager.AgentManager” on object at path /org/freedesktop/NetworkManager/AgentManager". Retry in 128 msec... libnm-dbus: <trace> [21405.04354] secret-agent[2f2af4ee102d7570]: register: retry registration... libnm-dbus: <trace> [21406.01097] secret-agent[2f2af4ee102d7570]: register: registration succeeded
| | * libnm/secret-agent: use GTask for nm_secret_agent_old_register*()Thomas Haller2019-12-161-55/+31
| | | | | | | | | | | | | | | This change is of course right and read nicer. Also, the GTask captures the current g_main_context_get_thread_default(). We will need that next.
| | * libnm/secret-agent: support debug logging from secret-agentThomas Haller2019-12-161-1/+21
| | |
| | * libnm/secret-agent: drop fallback to Register() method for secret-agentThomas Haller2019-12-161-68/+29
| | | | | | | | | | | | | | | | | | RegisterWithCapabilities() is supported since NetworkManager 0.9.9.1. Of course, we don't support such old server anymore (also, because we require the standard D-Bus interfaces like ObjectManager).
| | * libnm: allow using _LOGx() macros in libnmThomas Haller2019-12-161-0/+13
| | |
| | * shared: implement _LOGx() macros using log levels that are themself definesThomas Haller2019-12-161-63/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "nm-glib-aux/nm-logging-fwd.h" provides macros like _LOGD() to be reused by various parts which implement logging (by defining _NMLOG() accordingly). libnm also has logging, however it uses different logging levels aside LOGD_DEBUG. Instead, implement _LOGD() using a define _LOGL_DEBUG, so that libnm can redefine thos _LOGL_DEBUG defines and use the _LOGD() macro.
| | * shared: add nm_dbus_error_is() helperThomas Haller2019-12-162-0/+36
| |/
| * all: fix wrong "gs_free GError *" declarationsThomas Haller2019-12-164-6/+6
| | | | | | | | This is a bug and leads either to a leak or a crash.
| * checkpatch: catch "gs_free GError *" declationsThomas Haller2019-12-161-0/+1
| |
| * systemd: merge branch systemd into masterThomas Haller2019-12-1631-109/+1601
| |\
| | * systemd: update code from upstream (2019-12-13)Thomas Haller2019-12-1521-102/+1514
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git. ====== SYSTEMD_DIR=../systemd COMMIT=c8bf87b3399a3dd0b17fd0003b9797635b161ee0 ( 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-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/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/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_stdaux "src/basic/unaligned.h"
| * | client: fallback to CLOCK_MONOTONIC for timerfdThomas Haller2019-12-152-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RHEL7 supports clock_gettime(CLOCK_BOOTIME), but it does not support timerfd_create(CLOCK_BOOTIME). Creating a timerfd will fail with EINVAL. Fallback to CLOCK_MONOTONIC. Compare this to n-acd which also has compatibility code to fallback to CLOCK_MONOTONIC. However when n-acd falls back to CLOCK_MONOTONIC, it uses monotonic clock also for clock_gettime(). For n-dhcp4, the timestamps are also exposed in the public API (n_dhcp4_client_lease_get_lifetime()). Hence, for timestamps n-dhcp4 still uses and requires clock_gettime(CLOCK_BOOTIME). Only the internal timeout handling with the timerfd falls back to CLOCK_MONOTONIC. https://github.com/nettools/n-dhcp4/pull/13 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/362
| * | manager: create a virtual device only if the connection can autoconnectBeniamino Galvani2019-12-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The autoconnection for virtual devices currently works in two phases. First we detect that there is suitable profile that can autoconnect and we realize the device. Then, when the device becomes 'disconnected', autoconnect kicks in and starts the activation. However, if autoconnect is blocked for a device, currently we do step 1 without step 2, leaving a stale interface around. Fix this by also checking that autoconnect is not blocked during step 1. https://bugzilla.redhat.com/show_bug.cgi?id=1765047 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/360
| * | device: don't reapply IP configuration if the ifindex is missingBeniamino Galvani2019-12-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assertions will fail in ip_config_merge_and_apply() if the device doesn't have an ifindex. Reproducible with: $ nmcli connection add type ovs-bridge ifname ovs0 ipv4.method disabled ipv6.method disabled Connection 'ovs-bridge-ovs0' (1d5e794b-10ad-4b2b-aa7c-5ca7e34b0a55) successfully added $ nmcli device reapply ovs0 Error: Reapplying connection to device '(null)' (/org/freedesktop/NetworkManager/Devices/16) failed: Remote peer disconnected $ journalctl -u NetworkManager -e ... NetworkManager[73824]: nm_ip4_config_add_dependent_routes: assertion 'ifindex > 0' failed systemd[1]: NetworkManager.service: Main process exited, code=dumped, status=5/TRAP ...
| * | ovs: check state before starting ip configuration after link changeBeniamino Galvani2019-12-141-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | When the link becomes available, check that the device is in the ip-config state before starting ip configuration. Also, reset the 'waiting_for_interface' flag when the device deactivates. https://bugzilla.redhat.com/show_bug.cgi?id=1781165 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/358