Commit graph

27908 commits

Author SHA1 Message Date
Thomas Haller 3b6e57961d
platform: move "platform/{wifi,wpan}/" to "src/libnm-platform/" 2021-03-05 11:27:15 +01:00
Thomas Haller f435454615
platform: move "linux/nl802154.h" to "src/linux-headers/" 2021-03-05 11:27:15 +01:00
Thomas Haller a0662c05a3
platform: drop unnecessary #include from platform code 2021-03-05 11:27:15 +01:00
Thomas Haller 901a7ecbdd
core: move NMPObjectType to "libnm-platform/nmp-base.h" 2021-03-05 11:27:15 +01:00
Thomas Haller d3585243c3
core: move creating singleton instance out of "nm-platform.c"
In core, NMPlatform is (also) a singleton instance. As we will move platform code
to libnm-platform, this singleton part makes no sense there. Move the code
to NetworkManagerUtils.c.
2021-03-05 11:27:15 +01:00
Thomas Haller 9113a672cf
platform: move nm_utils_modprobe() to libnm-platform 2021-03-05 11:27:15 +01:00
Thomas Haller 7b18e15481
platform: move nm_utils_lifetime_*() to libnm-platform 2021-03-05 11:27:15 +01:00
Thomas Haller 690105c616
platform: move nm_utils_new_{vlan,infiniband}_name() to libnm-platform 2021-03-05 11:27:15 +01:00
Thomas Haller 2d9a9d0ded
core: move NM_PLATFORM_LIFETIME_PERMANENT to libnm-platform/nmp-base.h 2021-03-05 11:27:15 +01:00
Thomas Haller 398b509931
base: move "libnm-core-intern/nm-core-types-internal.h" to libnm-base
"libnm-platform" has no dependency on libnm-core. To have the symbols
accessible, move them to libnm-base.
2021-03-05 11:27:02 +01:00
Thomas Haller 40fc7bd39a
base: move bridge defines to libnm-base/nm-base.h 2021-03-05 11:09:15 +01:00
Thomas Haller 8755538e04
glib-aux: move nm_utils_route_type{2str,_by_name}() to libnm-glib-aux 2021-03-05 11:09:15 +01:00
Thomas Haller af0cfc559b
glib-aux: move nm_utils_ptrarray_find_first() helper to libnm-glib-aux 2021-03-05 11:09:15 +01:00
Thomas Haller a016f24353
glib-aux: move NMIcmpv6RouterPref to libnm-glib-aux 2021-03-05 11:09:15 +01:00
Thomas Haller 3c733cc32e
glib-aux: move nm_utils_sysctl_ip_conf_*() helpers 2021-03-05 11:09:14 +01:00
Thomas Haller 2ce9cf3e20
glib-aux: move nm_utils_ip4_address_is_{zeronet,link_local}() 2021-03-05 11:09:14 +01:00
Thomas Haller 57735e1e8e
glib-aux: move nm_utils_ip[46]_address_*() helpers 2021-03-05 11:09:14 +01:00
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