summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* all: use nm_str_hash() instead of g_str_hash()th/nm-hash-allThomas Haller2017-11-1516-29/+29
| | | | | | We also do this for libnm and libnm-core, where it causes visible changes in behavior. But if somebody would rely on the hashing implementation for hash tables, it would be seriously flawed.
* all: use nm_direct_hash() instead of g_direct_hash()Thomas Haller2017-11-1521-28/+28
| | | | | | We also do this for libnm, where it causes visible changes in behavior. But if somebody would rely on the hashing implementation for hash tables, it would be seriously flawed.
* all: don't use g_direct_equal() for hash table equality functionThomas Haller2017-11-1514-19/+19
| | | | | | | | | | GHashTable optimizes a NULL equality function to use direct pointer comparison. That saves the overhead of calling g_direct_equal(). This is also documented behavior for g_hash_table_new(). While at it, also don't pass g_direct_hash() but use the default of %NULL. The behavior is the same, but consistently don't use g_direct_hash().
* all: include "nm-utils/nm-hash-utils.h" by defaultThomas Haller2017-11-1514-19/+4
| | | | | | | | | Next we will use siphash24() instead of the glib version g_direct_hash() or g_str_hash(). Hence, the "nm-utils/nm-hash-utils.h" header becomes very fundamental and will be needed basically everywhere. Instead of requiring the users to include them, let it be included via "nm-default.h" header.
* shared: use siphash24() for nm_hash_ptr()Thomas Haller2017-11-152-9/+10
| | | | | | siphash24() mixes the bits much better then our naive xor. Don't bypass siphash24(). We supposedly use it for the better hashing properties, so use it also for pointers.
* shared: optimize nm_hash_str() for NULL to not use siphash24()Thomas Haller2017-11-152-5/+8
|
* shared: add nm_hash_static() to get a static hash keyThomas Haller2017-11-153-0/+39
| | | | | | | | | | | | | | | When using siphash24(), the hash value depends on the hashed input and the key from _get_hash_key(). If the input is static, so is also the result of siphash24(), albeit the bits are scrabbled more. Add a nm_hash_static() to get such a static key, but without actually doing siphash24(). The static key is also xored with a static_seed. For that, also mangle the first byte of the hash key using siphash24() itself. That is, because nm_hash_static() only uses the first guint of the random key. Hence, we want that this first guint has all the entropy of the entire key. We use siphash24() itself, to mangle all bits of the 16 byte key into the first guint.
* systemd: merge branch systemd into masterThomas Haller2017-11-159-12/+148
|\
| * systemd: update code from upstream (2017-11-15)Thomas Haller2017-11-158-12/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git on 2017-11-15, git commit e5bb1de8dd553569035c323a40160ffd1fb33a89. ====== SYSTEMD_DIR=../systemd COMMIT=e5bb1de8dd553569035c323a40160ffd1fb33a89 ( 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"
* | build: fix wrong jansson prerequisitesBeniamino Galvani2017-11-144-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently there are multiple features that require Jansson support, but WITH_JANSSON=1 is set only when configuring with --enable-json-validation. Therefore a build with "--disable-json-validation --enable-ovs" fails. The availability of Jansson (WITH_JANSSON) should only be used: - to check if dependent features can be enabled - to determine compiler and linker flags in the Makefile - in nm-jansson.h to define compatibility functions if needed Everything else must be controlled by a configure switch. https://bugzilla.gnome.org/show_bug.cgi?id=790233
* | platform: fix double closing netlink socketThomas Haller2017-11-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | The file descriptor is owned by the netlink socket instance, which we close in finalize. We most not close it when destroying the IO channel, otherwise the file descriptor gets closed twice. Closing an invalid file descriptor (or a descriptor that is already closed) is a serious bug, because the integer values are re-used, so there is a race that the close might affect an innocent file descriptor instead of just failing with EBADF.
* | all: use nm_close() instead of close()Thomas Haller2017-11-1414-40/+40
| |
* | shared: always call close() from nm_close() wrapperThomas Haller2017-11-141-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nm_close() wrapper should behave exactly the same as calling close() directly. This is well known, documented behavior. The only addition on top of that, should be the nm_assert() to catch double-closing. Prevously, when passing a negative file descriptor, we wouldn't properly set errno. Also, the call would not show up in strace, which it should (at least, if libc's close actually makes the syscall). I would argue, that passing a negative file descriptor is a bug already and we should never do that. Maybe we should even assert non-negative fds. I don't do that now, because I am not sufficiently confident. Anyway, the change should have not practical effect, because we shouldn't actually pass negative fds already.
* | core: allow slaves to autoactivate when master is availableBeniamino Galvani2017-11-132-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a master connection is deactivated by user, we set the autoconnect-blocked reason 'user-request' for the connection and we propagate the same reason to slaves. Doing so prevents the autoactivation of slaves when the master is manually activated again, because the only way to override the 'user-request' blocked reason is through manual activation of slaves. Instead what should happen is that the manual deactivation of a master marks slaves as blocked for failed dependencies. When the master becomes available again, slaves can autoactivate if the profile allows it. https://bugzilla.redhat.com/show_bug.cgi?id=1437598
* | device: make nm_device_state_reason_to_str() publicBeniamino Galvani2017-11-132-2/+3
| |
* | release: bump version to 1.11.1-dev after 1.10.0 release1.11.1-devth/masterThomas Haller2017-11-13137-137067/+117573
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | After 1.10.0 is released, merge it back into master so that 1.10.0 is part of the history of master. That means, $ git log --first-parent master will also traverse 1.10.0 and 1.10-rc*. Also bump the micro version to 1.11.1-dev to indicate that this is after 1.10.0 is out.
| * | po: update Ukrainian (uk) translation (bgo#790215)Yuri Chornoivan2017-11-131-1834/+2436
| | | | | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=790215
| * | all: merge branch 'th/platform-routes-onlink-rh1428334'Thomas Haller2017-11-1322-298/+572
| |\ \ | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1428334
| | * | platform/tests: add test for onlink route attributeThomas Haller2017-11-131-60/+142
| | | |
| | * | all: support route-attribute "onlink" for IPv4Thomas Haller2017-11-139-49/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kernel doesn't support it for IPv6. This is especially useful, if you combine static routes with DHCP. In that case, you might want to get the device-route to the gateway automatically, but add a static-route for it.
| | * | platform: consider RTNH_F_ONLINK onlink flag for IPv4 routesThomas Haller2017-11-133-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "onlink" flag for IPv4 routes is part of the route ID. Consider it in nm_platform_ip4_route_cmp(). Also, allow configuring the flag when adding a route. Note that for IPv6, the onlink flag is still ignored. Pretty much like kernel does.
| | * | platform: track all rtm_flags for routesThomas Haller2017-11-135-31/+70
| | | |
| | * | core: merge IPv4 and IPv6 version of _nm_ip_config_merge_route_attributes()Thomas Haller2017-11-133-92/+79
| | | |
| | * | shared: add nm_ip_addr_set() helperThomas Haller2017-11-131-0/+13
| | | |
| | * | shared/trivial: move codeThomas Haller2017-11-131-17/+17
| | | |
| | * | platform: add generic NM_PLATFORM_IP_ROUTE_CAST() macroThomas Haller2017-11-131-16/+4
| | | | | | | | | | | | | | | | A cast macro, that does some static type checking (of the pointer).
| | * | core: use NM_CONSTCAST() for NM_IP_CONFIG_CAST()Thomas Haller2017-11-132-27/+45
| | | |
| | * | build: detect compiler features _Generic() and __auto_type in configure scriptThomas Haller2017-11-132-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | There is still a fallback detection in "shared/nm-utils/nm-macros-internal.h", so that VPN-plugins and applet don't need to bother about adding these configure checks.
| | * | shared: propagate constness in _NM_GET_PRIVATE_PTR()Thomas Haller2017-11-133-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The _NM_GET_PRIVATE() macro already preserved and propagated the constness of @self to the resulting private pointer. _NM_GET_PRIVATE_PTR() didn't do that. Extend the macro, to make that possible.
| | * | shared: fix detection of _Generic() supportThomas Haller2017-11-131-1/+1
| |/ /
| * | core: fix build without connectivity checkBeniamino Galvani2017-11-122-1/+12
| | | | | | | | | | | | | | | | | | Fixes: 4dd30b784c53e9b61b6e3a2b2e135f589747fc06 https://bugzilla.gnome.org/show_bug.cgi?id=790222
| * | device: silent compiler warningBeniamino Galvani2017-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following warning: src/devices/nm-device.c: In function ‘activation_source_schedule’: src/devices/nm-device.c:4995:9: error: ‘source_func’ may be used uninitialized in this function [-Werror=maybe-uninitialized] new_id = g_idle_add (source_func, self); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| * | ofono: merge branch 'th/ofono-ip-config-fix'Beniamino Galvani2017-11-101-110/+79
| |\ \ | | | | | | | | | | | | Fixes for oFono support.
| | * | ofono: refactor error handling in context_property_changed()Thomas Haller2017-11-101-76/+58
| | | |
| | * | ofono: fix creating IP config with proper ifindex of InterfaceThomas Haller2017-11-101-20/+8
| | | | | | | | | | | | | | | | | | | | This was broken with the routing-rework. We need to determine the ifindex on which the configuration applies.
| | * | ofono: refactor error handling for missing Interface in ↵Thomas Haller2017-11-101-12/+12
| | | | | | | | | | | | | | | | context_property_changed()
| | * | ofono: fix leaks in context_property_changed()Thomas Haller2017-11-101-3/+2
| |/ /
| * | libnm-core: fix "Since" notation in team and team-port settings.Francesco Giudici2017-11-102-22/+22
| | | | | | | | | | | | | | | | | | | | | Not "Since 1.12" but "Since: 1.12". Fixes: 9715969b77300f47478b58482375dcd07dba1e85 Fixes: 1c99d379eb7ef1947beb4176a9611e404d1b220f
| * | device: add a new state-reason for DAD failuresBeniamino Galvani2017-11-093-3/+8
| | |
| * | device: don't necessarily fail the connection when ipv4 DAD failsBeniamino Galvani2017-11-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Don't necessarily fail the entire connection if a duplicate IPv4 address is detected, but instead look at the may-fail property and at the outcome of IPv6. https://bugzilla.redhat.com/show_bug.cgi?id=1508001
| * | merge: branch 'fg/team_abstraction_rh1398925'Francesco Giudici2017-11-0911-3/+1832
| |\ \ | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1398925
| | * | libnm-core: enforce team and team-port defaultsfg/team_abstraction_rh1398925Francesco Giudici2017-11-096-50/+81
| | | | | | | | | | | | | | | | Rework a bit the way default values are check, set and aligned.
| | * | cli: add team-port propertiesFrancesco Giudici2017-11-091-0/+47
| | | |
| | * | libnm-core: enforce team-port config and properties alignmentFrancesco Giudici2017-11-091-0/+50
| | | | | | | | | | | | | | | | | | | | Ensure .config is aligned when an explicit team-port is set and vice versa
| | * | libnm-core: add explicit team properties to NMSettingTeamPortFrancesco Giudici2017-11-094-0/+223
| | | |
| | * | cli: add team propertiesFrancesco Giudici2017-11-091-0/+179
| | | |
| | * | libnm-core: enforce team config and properties alignmentFrancesco Giudici2017-11-092-2/+169
| | | | | | | | | | | | | | | | Ensure .config is aligned when an explicit team property is set and vice versa.
| | * | libnm-core: add explicit team properties to NMSettingTeamFrancesco Giudici2017-11-094-2/+745
| | | |
| | * | libnm-core: add inline functions to update team json configFrancesco Giudici2017-11-091-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | Add functions and structure to simplify json config and team property enforcement. These will be used in both NMSettingTeam and NMSettingTeamPort.
| | * | libnm-core: add functions to align team json config to exposed propertiesFrancesco Giudici2017-11-092-1/+304
| | | |