Commit graph

26900 commits

Author SHA1 Message Date
Thomas Haller
ee4e679bc7
dns: don't apply DNS configuration for external connections
External connections are devices that are configured outside of
NetworkManager. Such devices should be mostly ignored and not
be interfered with.

Note that we tend to create external connection profiles for
such devices. That happens for example if you use wg-quick to
manage a WireGuard interface outside of NetworkManager. But it
really happens for any interface.

This generated profile has no DNS configuration. Unless we use
the systemd-resolved backend, they thus don't contribute to the DNS
settings (which is fine).

However, with systemd-resolved, NetworkManager would also reset
the DNS configuration of those external interfaces. That is clearly
wrong. NetworkManager should only care about the interfaces that it
actively manages and leave others alone.

How to reproduce: use systemd-resolved and configure an interface outside
of NetworkManager. Note that `nmcli device` shows the state as
"connected (externally)". Note that `resolvectl` shows the DNS configuration
on that external interface. Do something in NetworkManager to trigger
a DNS update (e.g. SIGHUB or reactivate a profile). Note in `resolvectl`
that the external interface's DNS configuration was wiped.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/563#note_673283
(cherry picked from commit 395665902b)
2020-11-17 18:51:59 +01:00
Aleksander Morgado
e0da93172f
wwan: update default connection timeout to 200s
The following merge request in ModemManager introduces a more or less
common timeout value for the connection attempts in all plugin and
protocol implementations:

  https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/391

The value chosen by default for the steps that may take long to
complete in a connection attempt is 180s, and 120s for the steps in
the disconnection path.

Until now, every different plugin or protocol had a different timeout
value, all of them <= 180s, and with that change in ModemManager, the
values are now aligned for all.

Note, though, that this does not mean that a connection attempt will
take always less than 180s, as there may be multiple other steps in
addition to the one that took the maximum timeout. The value chosen
for NetworkManager is a compromise between the new defaults from MM
and what the user would expect under e.g. very low quality conditions.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/678
(cherry picked from commit 5b7ce438d9)
2020-11-16 16:08:30 +01:00
Beniamino Galvani
cd58512ba3 dns: sd-resolved: fix hash table initialization
The hash table was not initialized if there was no D-Bus connection at
the time of object creation.

Fixes: f70ee67058 ('dns: sd-resolved: reset interface configuration on deactivation')

https://bugzilla.redhat.com/show_bug.cgi?id=1894839
(cherry picked from commit d6457902d1)
2020-11-09 08:59:01 +01:00
Antonio Cardace
5d63508bb1
merge branch 'ac/bridge_mtu_autoadjust' into master
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/656

(cherry picked from commit c4b6962ed2)
2020-11-02 17:47:27 +01:00
Antonio Cardace
864872e9a8
bridge: force (hack)-set of the MTU when explicitly set in the profile
Kernel does a auto-mtu adjusting process whenever a port is added/removed from
the bridge, this can cause issues when NM wants to explicitly set an MTU which is
equal to the bridge default one (1500) because if later a port is added with a
different MTU the kernel will assign the bridge that port's MTU resulting in the bridge
runtime configuration differing from the bridge's NM connection profile.

What we can do is to always apply the MTU manually for the bridge (if explicitly
set by the profile), after doing so the kernel won't modify the MTU anymore,
which is what we want, problem is that kernel won't actually apply the MTU
to the netdev if it's not actually changing so we first apply it to
MTU-1 and then to the desired value.

https://bugzilla.redhat.com/show_bug.cgi?id=1778590

Signed-off-by: Antonio Cardace <acardace@redhat.com>
(cherry picked from commit e23798a5e5)
2020-11-02 17:47:26 +01:00
Antonio Cardace
8d8017a620
bridge: set MTU at link creation time
https://bugzilla.redhat.com/show_bug.cgi?id=1778590

Signed-off-by: Antonio Cardace <acardace@redhat.com>
(cherry picked from commit 516c623618)
2020-11-02 17:47:26 +01:00
Antonio Cardace
05e8b018ec
platform: allow setting the MTU at link creation time
Add a parameter to the 'link_add()' virtual function so that
the MTU will be configured (via netlink) by the kernel when
creating the link.

https://bugzilla.redhat.com/show_bug.cgi?id=1778590

Signed-off-by: Antonio Cardace <acardace@redhat.com>
(cherry picked from commit ba2ee46254)
2020-11-02 17:47:26 +01:00
Beniamino Galvani
a9c952d34c dns: sd-resolved: reset interface configuration on deactivation
If an update doesn't contain an interface but the previous update did,
the systemd-resolved DNS plugin must send a request to clear the
previous configuration. Otherwise the previous DNS configuration would
persist even after interface deactivation.

https://bugzilla.redhat.com/show_bug.cgi?id=1888229
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/662
(cherry picked from commit f70ee67058)
2020-10-29 17:26:50 +01:00
Thomas Haller
40edd49025
device/wifi: don't reset the SSID of a NMWifiAP to unknown
For hidden networks, we usually don't have an SSID. We try to match
and fill the SSID based on the profiles that we have:

  <debug> [1603798852.9918] device[6b383dca267b6878] (wlp2s0): matched hidden AP AA:BB:CC:DD:EE:FF => "SSID"

However, we should not clear that value again on the next update:

  <trace> [1603798856.5724] sup-iface[66c1a0883a262394,0,wlp2s0]: BSS /fi/w1/wpa_supplicant1/Interfaces/0/BSSs/3 updated
  <debug> [1603798856.5726] device[6b383dca267b6878] (wlp2s0): wifi-ap: updated AA:BB:CC:DD:EE:FF (none)

Once we have a SSID, we can only update it to a better value,
but not clear it.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/438

Fixes: b83f07916a ('supplicant: large rework of wpa_supplicant handling')
(cherry picked from commit eb36380335)
2020-10-27 14:11:39 +01:00
Fernando Fernandez Mancera
d28133ad0d Makefile: remove "libnm.actions" explicitly when uninstalling
On Fedora 33 when compiling NetworkManager it is failing with the
following error:

```
ERROR: files left in build directory after distclean:
./docs/libnm/libnm.actions
make[1]: *** [Makefile:18427: distcleancheck] Error 1
make[1]: Leaving directory '/builddir/nm-build/NetworkManager/NetworkManager-1.27.90/_build/sub'
make: *** [Makefile:18356: distcheck] Error 1
Error make distcheck
```

Adding the file to the DISTCLEANFILES will enforce the removal of this
file.

Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/659
(cherry picked from commit 9a935e516e)
2020-10-26 15:57:52 +01:00
Thomas Haller
2bfe9becd9
shared: introduce opaque type NMUtilsUserData for nm_utils_user_data_pack()
This makes the usage slightly more type safe.

(cherry picked from commit 6e44842dc6)
2020-10-22 20:54:43 +02:00
Antonio Cardace
50adaf7414
manager: fix very bad usage of 'nm_utils_user_data_unpack'
This results in the args of 'nm_utils_user_data_unpack'
containing random data potentially also from the
previous stack-frame which is really really bad.

Signed-off-by: Antonio Cardace <acardace@redhat.com>
Fixes: b50702775f ('device: implement auth-request as async operation nm_manager_device_auth_request()')
(cherry picked from commit b6a18e0593)
2020-10-22 20:54:41 +02:00
David Rheinsberg
eac2b67052
c-rbtree: align CRBTree with CRBNode
We sometimes store pointers to `CRBTree` in `CRBNode*` variables, so we
must make sure CRBTree has matching alignment guarantees. We already
check for that with static-assertions.

This commit aligns CRBTree with CRBNode for 2-byte aligned machines.
While at it, add a short comment explaining what the unions are for.

Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>

c795b7657f
(cherry picked from commit 1250fcc2b1)
2020-10-21 10:41:15 +02:00
Thomas Haller
72dd79e817
c-rbtree: fix struct alignment of CRBTree on m68k architectures
On m68k, 32bit integer are aligned to only 2 bytes. This breaks
assumptions and a static assertion of c-rbtree.

Explicitly require that the first field is aligned to at least 4 bytes.
This fixes the build and ensures that all valid pointers to a CRBTree have
the lowest two bits unset (so they can be used for storing 2 additional flags).

Use a union instead of aligning __parent_and_flags itself. That is
because alignas() cannot lower the natural alignment, so if we would
want to align __parent_and_flags, we could only do

  alignas(sizeof(unsigned long) > 4 ? sizeof(unsigned long) : 4)

That would not be correct if "long" is 8 bytes long but had a natural
alignment of only 4. The union allows us to specify an alignment
of at least 4, but otherwise follow natural alignment.

10d973a9e6
(cherry picked from commit 143130066b)
2020-10-21 10:41:14 +02:00
Beniamino Galvani
07c80ceb68 release: bump version to 1.27.91 (1.28-rc2) (development) 2020-10-20 18:12:12 +02:00
Beniamino Galvani
f02dbdb0b8 NEWS: update 2020-10-20 17:14:35 +02:00
Beniamino Galvani
f091730ebc initrd: generate infiniband connections
Generate infiniband connections based on the interface name or MAC
address length.

https://bugzilla.redhat.com/show_bug.cgi?id=1883173
(cherry picked from commit 317171ed6e)
2020-10-20 09:27:08 +02:00
Thomas Haller
d585ccdb7c
shared: fix NM_CAST_STRV_CC() for "char **const" pointers
clang-3.4.2-9.el7.x86_64 otherwise fails:

    ../src/devices/wifi/nm-wifi-p2p-peer.c:410:44: error: controlling expression type 'const char **const' not compatible with any generic association type
        if (!nm_utils_strv_equal(priv->groups, peer_info->groups)) {
                                               ^~~~~~~~~~~~~~~~~
    ../shared/nm-glib-aux/nm-shared-utils.h:1689:78: note: expanded from macro 'nm_utils_strv_equal'
    #define nm_utils_strv_equal(strv1, strv2) (nm_utils_strv_cmp_n((strv1), -1, (strv2), -1) == 0)
                                                                                 ^
    ../shared/nm-glib-aux/nm-shared-utils.h:1687:74: note: expanded from macro 'nm_utils_strv_cmp_n'
        _nm_utils_strv_cmp_n(NM_CAST_STRV_CC(strv1), (len1), NM_CAST_STRV_CC(strv2), (len2))
                                                                             ^
    ../shared/nm-glib-aux/nm-macros-internal.h:706:21: note: expanded from macro 'NM_CAST_STRV_CC'
            (_Generic ((value), \
                        ^

(cherry picked from commit 8dc3f07d34)
2020-10-19 23:04:52 +02:00
Thomas Haller
4b11029df9
device/wifi: fix leak of NMSupplicantPeerInfo.peer_path in NMSupplicantInterface
Fixes: b83f07916a ('supplicant: large rework of wpa_supplicant handling')
(cherry picked from commit 3cf8620294)
2020-10-12 21:42:16 +02:00
Benjamin Berg
9cd4968b7b
wifi: re-add code for tracking a peers groups
The code to track the property was accidentally removed in commit
21d4a26188 ('core: remove code for unused NM_WIFI_P2P_PEER_GROUPS property')
causing all P2P connections to fail after 5 seconds.

Fixes: 21d4a26188 ('core: remove code for unused NM_WIFI_P2P_PEER_GROUPS property')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/551

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/650
(cherry picked from commit dc54a946ac)
2020-10-12 21:41:12 +02:00
Juliano de Souza Camargo
817f2cb90e
po: update Portuguese (pt) translation
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/648
(cherry picked from commit 0fe92f40fc)
2020-10-12 10:04:24 +02:00
Yuri Chornoivan
4747f99beb
po: update Ukrainian (uk) translation
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/647
(cherry picked from commit f660801a7b)
2020-10-12 10:01:32 +02:00
Beniamino Galvani
ff25a9b8d1 dns: merge branch 'bg/dns-vpn'
https://bugzilla.redhat.com/show_bug.cgi?id=1863041
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/631

(cherry picked from commit bba1ab0f21)
2020-10-09 10:31:18 +02:00
Beniamino Galvani
f10e4fe8c8 dns: change default DNS priority of VPNs to -50
Change the default DNS priority of VPNs to -50, to avoid leaking
queries out of full-tunnel VPNs.

This is a change in behavior. In particular:

 - when using dns=default (i.e. no split-dns) before this patch both
   VPN and the local name server were added (in this order) to
   resolv.conf; the result was that depending on resolv.conf options
   and resolver implementation, the name servers were tried in a
   certain manner which does not prevent DNS leaks.
   With this change, only the VPN name server is added to resolv.conf.

 - When using a split-dns plugin (systemd-resolved or dnsmasq), before
   this patch the full-tunnel VPN would get all queries except those
   ending in a local domain, that would instead be directed to the
   local server.
   After this patch, the VPN gets all queries.

To revert to the old behavior, set the DNS priority to 50 in the
connection profile.

(cherry picked from commit af13081bec)
2020-10-09 10:31:18 +02:00
Beniamino Galvani
c5b57526ac dns: add wildcard domain to VPNs with never-default=no and no domains
If a VPN has never-default=no but doesn't get a default route (this
can happen for example when the server pushes routes with
openconnect), and there are no search domains, then the name servers
pushed by the server would be unused. It is preferable in this case to
use the VPN DNS server for all queries.

https://bugzilla.redhat.com/show_bug.cgi?id=1863041
(cherry picked from commit cefd5ee322)
2020-10-09 10:31:18 +02:00
Beniamino Galvani
3ebe333492 core: add never-default field to NMIP{4,6}Config
(cherry picked from commit 9eba457426)
2020-10-09 10:31:18 +02:00
Beniamino Galvani
25de8a6a25 dns: slightly refactor rebuild_domain_lists()
Centralize wildcard domain assignment in a single place.

(cherry picked from commit e05550c34c)
2020-10-09 10:31:18 +02:00
Thomas Haller
bb802507e4
cli: fix showing active state for nmcli con show with fields
With "connection.multi-connect", a profile can be activated multiple
times on a device with `nmcli connection show`. Also, a profile may be
in the process of deactivating on one device, while activating on
another one. So, in general it's possible that `nmcli connection show`
lists the same profile on multiple lines (reflecting their multiple
activation states).

If the user requests no fields that are part of the activation state,
then the active connections are ignored. For example with `nmcli
-f UUID,NAME connection show`. In that case, each profile is listed only
once.

On the other hand, with `nmcli -g UUID,NAME,DEVICE connection show` the
user again requested also to see the activation state, and a profile can
appear multiple times.

To handle that, we need to consider which fields were requested.

There was a bug where the "ACTIVE" field was not treated as part of the
activation state. That results in `nmcli -f UUID,NAME,ACTIVE connection
show` always returning "no". Fix that.

Fixes: a1b25a47b0 ('cli: rework printing of `nmcli connection` for multiple active connections')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/547

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/642
(cherry picked from commit 4eb3b5b9dd)
2020-10-09 10:24:02 +02:00
Thomas Haller
aab2775acf
cli: honor and prefer color schemes with ".scheme" extension
According to `man terminal-colors.d`, the extension should be ".scheme"
and not ".schem". Prefer that, but keep honoring ".schem" file, if it
exists.

https://bugzilla.redhat.com/show_bug.cgi?id=1886336
(cherry picked from commit f1830ab0de)
2020-10-09 09:56:11 +02:00
Michael Biebl
dfd54b7f2e
systemd: basic/missing_syscall: fix syscall numbers for mips*
Thanks Christian Brauner @brauner

cd20659891

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/545
(cherry picked from commit e9c6561ffa)
2020-10-08 10:37:25 +02:00
David Rheinsberg
282fac4afb
c-rbtree: reduce alignment constraints
There are some Debian-supported architectures where `max_align_t` is
only aligned to 4-bytes. This is unfortunate and breaks our assumptions.
While glibc-malloc still guarantees 8 / 16 bytes alignment, this is not
necessarily guaranteed by the C standard (and alternative allocators
will deviate (see jemalloc, for instance)).

Fortunately, we only need 2 flags, so a 4-byte alignment is more than
enough.

Reported-by: Thomas Haller
Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>

https://github.com/c-util/c-rbtree/pull/4
(cherry picked from commit 1554936e33)
2020-10-07 16:24:04 +02:00
Thomas Haller
b569687f5f
platform/tests: skip test_platform_ip_address_pretty_sort_cmp() on non-amd64 archs
The test only works on amd64, because it relies on the memory layout of
the structures.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/546
(cherry picked from commit 6cf7c6739f)
2020-10-07 09:15:52 +02:00
Thomas Haller
36ccbcc550
platform/tests: print details about test failure for test_platform_ip_address_pretty_sort_cmp()
When the test is about to fail, print the wrong data to help debugging
the test failure.

(cherry picked from commit 3576f54100)
2020-10-07 09:15:51 +02:00
Thomas Haller
07868a535f
platform/tests: adjust regeneration of test code for test_platform_ip_address_pretty_sort_cmp()
Since re-formatting our source code, the generated output no longer
matched the required formatting. Adjust it.

(cherry picked from commit 4fc7973498)
2020-10-07 09:15:51 +02:00
Alfonso Sánchez-Beato
78dc57d8f4
platform: use also statvfs() to check for udevd
Check whether or not there is a running udevd by using statvfs() on
"/sys" and use access() as a fallback. This is in line with what is
done by systemd [1] and helps in case NM is not really running in a
container but has been confined by a MAC so it does not have full
access to sysfs (access() returns EACCES).

[1] https://github.com/systemd/systemd/blob/v246/src/basic/stat-util.c#L132

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/639
(cherry picked from commit 9c8275bedc)
2020-10-06 19:04:13 +02:00
Thomas Haller
47a0f21181
wifi/iwd: merge branch 'balrog-kun:iwd-fixes'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/640

(cherry picked from commit 838c3d6795)
2020-10-06 14:22:08 +02:00
Andrew Zaborowski
de093910a3
iwd: Subscribe to object-added/removed ObjectManager signals
GDBusObjectManagerClient's interface-added and interface-removed signals
are not emitted when the new interfaces are added to a completely new
object or the removal results in the object disappearing.  In other
words one interface is never reported both through interface-added and
object-added (or -removed) signals.  This kind of makes sense but isn't
documented explicitly so interface-added seemed to correspond to DBus
InterfacesAdded signals which it doesn't.

We need to watch for both kinds of signals and although most things
work without us receiving the signals at all, it causes some race
conditions.  For example on hotplug, devices wouldn't transition to
"disconnected" if a device was discovered by NMManager before it
appeared on IWD's dbus interface because that scenario relied on the
dbus signal.

(cherry picked from commit 1c1f4a3b40)
2020-10-06 14:22:08 +02:00
Andrew Zaborowski
f533ce5b95
iwd: Disable periodic scanning when connected
The automatic scanning every 20 seconds while connected has been
annoying users because of the extra connection latency, drop it.  The
UIs are supposed to be requesting scans whenever an AP list update is
needed (?).

(cherry picked from commit c2c68ce169)
2020-10-06 14:22:08 +02:00
Andrew Zaborowski
2a3b3ca38d
iwd: Disconnect signals in NMDeviceIwd's dispose
Fix a crash on device unplugging caused by keeping our signal handlers
for GDBusProxies connected after a call to dispose().  Do this by
replacing most cleanup steps by a nm_device_iwd_set_dbus_object(self, NULL)
call which is more meticulous.

(cherry picked from commit d2b0c5af63)
2020-10-06 14:22:07 +02:00
Thomas Haller
1b2bee0e76
build: fix "create-exports-NetworkManager.sh" to fail if "nm" fails
Despite `set -e`, the shell script does not fail if the command in the
here document fails. This can happen if binutils' "nm" fails.

  NM=/bin/false "./tools/create-exports-NetworkManager.sh" --called-from-build "."

(cherry picked from commit 7fe76f54e3)
2020-10-06 13:34:22 +02:00
Thomas Haller
8e94ad04ff
systemd: workaround compilation failures against old glibc
Building against older libc/kernel headers can fail, because our glue
code for systemd has issues. Fix them by forward declaring "struct
statx" and by disabling parts of "socket-util.c".

(cherry picked from commit b7e08f685d)
2020-10-05 23:14:31 +02:00
Beniamino Galvani
4adf6afda5 release: bump version to 1.27.90 (1.28-rc1) 2020-10-05 18:43:28 +02:00
Beniamino Galvani
42aa292907 NEWS: update 2020-10-05 18:33:19 +02:00
Beniamino Galvani
fa7f83b26a systemd: merge branch systemd into master 2020-10-05 17:10:24 +02:00
Beniamino Galvani
aaf882b859 systemd: update code from upstream (2020-10-05)
This is a direct dump from systemd git.

======

SYSTEMD_DIR=../systemd
COMMIT=b182195acc3f5eeb97b2b4b60d36796b399e5a01

(
  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"
2020-10-05 16:56:33 +02:00
Thomas Haller
6220b08c78
platform: reorder fields in NMPClass struct
Almost always we don't care about the order of our fields inside
structs. Hence, choose an order in which holes due to memory alignment
are minimized.
2020-10-05 15:54:09 +02:00
Thomas Haller
0d7bf62aac
test/trivial: rename ASSERT_nmp_cache_is_consistent() function to nmtst_assert_nmp_cache_is_consistent()
We sometimes expose test-only functions as part of our API, to give direct
access to unit tests. Such functions should have a "NMTST" prefix. Rename.
2020-10-05 15:46:42 +02:00
Thomas Haller
f2b5812af3
platform: add typedefs for casting functions pointers to improve formatting
The autogenerated formating in these cases is rather ugly. Instead,
introduce a typedef and use that for casting the function pointer.
2020-10-05 15:46:42 +02:00
Thomas Haller
c6308162cf
platform: fix formatting for _vt_cmd_plobj_id_cmp()/_vt_cmd_plobj_id_hash_update() 2020-10-05 15:46:42 +02:00
Thomas Haller
978145f8ba
shared: return NULL from nm_malloc_maybe_a() when asking for zero bytes
The documentation of g_alloca()/alloca() isn't clear about what
happens when asking for zero bytes. Make it clear, by always returning
NULL.

Also, add a static assertion that @alloca_maxlen is a well-defined
positive integer.
2020-10-02 11:51:33 +02:00