Commit graph

27891 commits

Author SHA1 Message Date
Thomas Haller
ec22551ce9
glib-aux: move NMUtilsIPv6IfaceId struct to libnm-glib-aux 2021-03-05 11:09:14 +01:00
Thomas Haller
2ab87642f6
glib-aux: move NMLinkType to "libnm-glib-aux/nm-shared-utils.h"
It is a bit odd to do this, because usually libnm-glib-aux is not
about network related stuff. But that is not true entirely, because
it also contains NMIPAddr and other related helper funcitons.

NMLinkType is only a plain enum, there is no logic beyond it.
As such, I think it's acceptable to move it here.

There reason to do this, is that I want to move NMUtilsIPv6IfaceId and
nm_utils_get_ipv6_interface_identifier() out of src/core/, and since
that API is also trival helpers without complex state, it fits to
libnm-glib-aux. As such, we will need also NMLinkType there.
2021-03-05 11:09:14 +01:00
Thomas Haller
2b6baccff8
core: use _NM_UTILS_HWADDR_LEN_MAX instead of NM_UTILS_HWADDR_LEN_MAX 2021-03-05 11:09:14 +01:00
Thomas Haller
e691657da0
core: use _NMVlanFlags instead of NMVlanFlags 2021-03-05 11:09:14 +01:00
Thomas Haller
82e2a694d7
core: use _NM80211Mode instead of NM80211Mode 2021-03-05 11:09:13 +01:00
Thomas Haller
a5865cef1a
core: use _NMDeviceWifiCapabilities instead of NMDeviceWifiCapabilities 2021-03-05 11:09:13 +01:00
Thomas Haller
d2abd70932
core: use _NMSettingWirelessWakeOnWLan instead of NMSettingWirelessWakeOnWLan 2021-03-05 11:09:13 +01:00
Thomas Haller
8a3df8419a
libnm-base: add internal _NMVlanFlags type 2021-03-05 11:09:13 +01:00
Thomas Haller
ad91e92b25
libnm-base: add internal _NM80211Mode type 2021-03-05 11:09:13 +01:00
Thomas Haller
367be3585f
libnm-base: add internal _NMDeviceWifiCapabilities type 2021-03-05 11:09:13 +01:00
Thomas Haller
096ee5ed6e
libnm-base: add internal _NMSettingWirelessWakeOnWLan type
NMSettingWirelessWakeOnWLan is public API of libnm/libnm-core
in "src/libnm-core-public/"

We want that libnm-platform is independet of libnm-core to keep
the dependencies smaller and code better separated. Hence we
cannot use that enum there.

Duplicate NMSettingWirelessWakeOnWLan as _NMSettingWirelessWakeOnWLan
in libnm-base.
2021-03-05 11:09:13 +01:00
Thomas Haller
c61d869646
platform: avoid nm_utils_hwaddr_ntoa() in "nm-platform.c" 2021-03-05 11:09:13 +01:00
Thomas Haller
5c790db8b6
glib-aux: move ssid utils from "libnm-core-impl" to "libnm-glib-aux"
The purpose is of course to be able to use it outside of the internal
API from libnm-core-intern.
2021-03-05 11:09:12 +01:00
Thomas Haller
b3f5113503
glib-aux: move nm_utils_exp10() from core to libnm-glib-aux 2021-03-05 11:09:12 +01:00
Thomas Haller
9c32ba1910
glib-aux: add _nm_utils_hwaddr_ntoa_maybe_a() helper macro 2021-03-05 11:09:09 +01:00
Jonathan Lebon
1c0932a6e6
core/dns: emit CONFIG_CHANGED signal even if caching
With systemd-resolved, NetworkManager considers `/etc/resolv.conf`
unmanaged. This breaks hostname lookups in a subtle way: when a new
connection comes online, NM will initiate the hostname lookup *before*
propagating DNS updates to systemd-resolved, which of course will cause
the request to fail. And because NM doesn't update `/etc/resolv.conf`,
it doesn't emit a `CONFIG_CHANGED` signal which would've restarted the
lookup.

Fix this by emitting a signal also when using a caching DNS plugin.

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

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/770
2021-03-04 17:21:46 +01:00
zsien
29ba46b722
wifi: fix SpecificObject of ActiveConnection not updated after WiFi roaming
The SpecificObject property of ActiveConnection should be updated after WiFi roaming.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/768
2021-03-04 17:01:18 +01:00
Thomas Haller
fc142c24ee
core/tests: fix unit tests after changing syslog idenfier
Fixes: 62727b62e0 ('logging: fix syslog identifier for NetworkManager')
2021-03-03 12:34:00 +01:00
Thomas Haller
62727b62e0
logging: fix syslog identifier for NetworkManager
We no longer define G_LOG_DOMAIN differently for the libraries and
applications. Instead, the use now all "nm".

However, that also changes the syslog identifier for NetworkManager
core. That is undesirable. Change it back to "NetworkManager".

Fixes: 341b6e0704 ('all: change G_LOG_DOMAIN to "nm"')
2021-03-03 11:15:16 +01:00
Thomas Haller
afd55358a4
contrib/scripts: fix "nm-copr-build.sh" script to use new nm-git-bundle 2021-03-03 11:00:06 +01:00
Thomas Haller
2d7bd768b0
man: fix spelling error in man NetworkManager.conf 2021-03-03 09:55:29 +01:00
Thomas Haller
02266859aa
man: better explain device.carrier-wait-timeout in man NetworkManager.conf
https://bugzilla.redhat.com/show_bug.cgi?id=1929513

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/765
2021-03-03 09:49:07 +01:00
Thomas Haller
a708a172a6
core: increase limit of open file descriptors for NetworkManager.service
Note that POSIX select() can only handle up to 1024 descriptors. That
means, our code (and the libraries that we use) must not use select().

Note that libndp uses select(), which means NetworkManager will crash
when using file descriptors larger than 1023. On the other hand,
depriving NetworkManager of file descriptors will also crash it.
So libndp must be fixed ([1]).

[1] https://listman.redhat.com/archives/libndp-list/2021-February/msg00000.html

https://bugzilla.redhat.com/show_bug.cgi?id=1926599
2021-03-03 09:17:35 +01:00
Thomas Haller
04affbdd3d
build: merge branch 'th/move-client-libs'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/766
2021-03-02 17:56:30 +01:00
Thomas Haller
7767aaaee2
build: move "clients/nm-online.c" to "src/nm-online/" 2021-03-02 08:38:26 +01:00
Thomas Haller
7e81f4478d
build: move "clients/tui/newt/" to "src/libnmt-newt/" 2021-03-02 08:38:26 +01:00
Thomas Haller
54976f23cd
build: move "clients/common/" to "src/libnmc-{base,setting}/" 2021-03-02 08:38:25 +01:00
Thomas Haller
044da26bb7
build: merge branch 'th/build-meson-cleanup'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/763
2021-03-01 12:07:06 +01:00
Thomas Haller
107861ff57
build: move "dispatcher/" to "src/nm-dispatcher/" 2021-02-28 18:56:09 +01:00
Thomas Haller
452ba8408c
build/meson: cleanup tests 2021-02-28 18:56:08 +01:00
Thomas Haller
992402adfb
build/meson: cleanup libnm-client-aux-extern 2021-02-28 18:56:08 +01:00
Thomas Haller
d81b5c4129
build/meson: cleanup libnm-client-impl 2021-02-28 10:44:08 +01:00
Thomas Haller
20c955fd61
build/meson: don't link static library libnm_client_impl with helper
Per convention, we shall no link our static libraries with other static
libraries of our own. The purpose is that we only link static libraries
at the end of each build product (that is, in executables, shared
libraries and shared modules).
2021-02-28 10:42:06 +01:00
Thomas Haller
4c98a45270
build/meson: drop libnm_nm_default_dep dependency 2021-02-28 10:42:06 +01:00
Thomas Haller
478142ddeb
build/meson: cleanup dependencies for libnm-core-aux-extern 2021-02-28 10:42:06 +01:00
Thomas Haller
70836d6a08
build/meson: explicitly link libnm-crypto 2021-02-28 10:42:06 +01:00
Thomas Haller
c9bbd15597
build/meson: explicitly link libnm-core-aux-intern 2021-02-28 10:42:05 +01:00
Thomas Haller
e2004d2849
build/meson: cleanup dependencies for libnm-core-impl 2021-02-28 10:42:05 +01:00
Thomas Haller
e52d59f6c2
build/meson: cleanup dependencies for libnm-core-aux-intern 2021-02-28 10:42:05 +01:00
Thomas Haller
e560b551ae
build/meson: remove unnecessary libnm_core_intern_dep 2021-02-28 10:42:05 +01:00
Thomas Haller
ee41da2281
build/meson: remove unnecessary nm_version_macro_header to create libnm_client_public_enum_sources 2021-02-28 10:42:05 +01:00
Thomas Haller
bb4a10719c
build/meson: cleanup dependencies for libnm-platform 2021-02-28 10:42:04 +01:00
Thomas Haller
08ce50c6d8
build/meson: cleanup dependencies for libnm-base 2021-02-28 10:42:04 +01:00
Thomas Haller
cac8e895b6
build/meson: cleanup dependencies for libnm-udev-aux 2021-02-28 10:42:04 +01:00
Thomas Haller
fd69080c9b
build/meson: cleanup dependencies for libnm-systemd-shared 2021-02-28 10:42:04 +01:00
Thomas Haller
a9540fb927
build/meson: drop libnm_log_core_dep dependency 2021-02-28 10:42:04 +01:00
Thomas Haller
309dccf5f9
build/meson: cleanup libnm-glib-aux dependencies
Avoid dependencies but explicitly link the static library where it is
used.

This also fixes that we linked libnm-log-core into
libnm-settings-plugin-ifcfg-rh.so, which duplicated the symbols
while it should used them from NetworkManager.
2021-02-28 10:42:04 +01:00
Thomas Haller
2665b91288
core: rename level_desc global variable
Symbols in header files should almost always have an "nm" prefix.

That is not purely cosmetic, because core modules (like libnm-device-plugin*.so
and libnm-settings-plugin*so) should re-use the symbols of the NetworkManager
binary. For NetworkManager we generate a linker version script to only expose
the symbols that are needed. It thereby excludes symbols that don't have an "nm"
prefix.

Hence, the plugins otherwise cannot reuse the global symbol.

The only reason that we currently don't have a linker error is because
we also link the logging static library into the plugin modules. That is
wrong, because we should not duplicate these symbols.
2021-02-28 10:42:03 +01:00
Thomas Haller
bdabc9e38c
build/meson: cleanup build for c-util and nettools helper libraries
We have a number of static helper libraries. When a user is using such a
library, they need to set the include search paths (-I) and link with
the static library at the right place.

The first part, the include search path, is now trivial. We no longer
add the individual search paths but everybody uses "-I. -Isrc/".

The second part means that when we build a shared library or an
executable that uses symbols from the static library, we need to link
it. But only then, and not earlier so that not multiple intermediate
build products (static libraries too) contain the same code. Note that
for libnm-device-plugin-*.so and other core plugins it's even that
those shared modules should not themselves link with the static
helpers. Instead, the need to use the symbols from NetworkManager.

Easy enough. Previously, we would sometimes define dependencies in
meson. But as it's really simple, I think that those dependencies
obfuscate more than help. Instead drop them, and only explicitly link
where we need it. The exception is libNetworkManagerTest_dep, which
is still a dependency. Maybe that dependency is fine, as it is much
later in the process. Or maybe that will also be replaced in the future.
2021-02-28 10:41:24 +01:00
Thomas Haller
8bfe1ebcec
build/introspection: cleanup dependencies for libnmdbus in meson 2021-02-24 12:50:25 +01:00