summaryrefslogtreecommitdiff
path: root/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
...
* | ifcfg-rh: add support for ipv4.link-localAdrian Freihofer2022-05-271-0/+1
| |
* | libnm: replace nm-types.h by defining the types in respective headersLubomir Rintel2022-05-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The typedefs in nm-types.h confuse gtkdoc-scan. It generates a libnm-sections.txt file like this: <SECTION> <FILE>nm-types</FILE> <TITLE>NMDeviceOvs</TITLE> NMAccessPoint NMActiveConnection NMCheckpoint NMClient NMDevice ... Note the wrongly picked title and, more importantly, the object types in a bogus section. This in turn makes gtkdoc-mkdb fail to include the property and signal documentation in appropriate sections. Without nm-types.h, we need to mind the header dependencies. This means that we need to order the headers that define types before the ones that use them. Also, we need to break the depencency loops in few palces.
* | systemd: drop "nm-sd-utils-core.h" and nm_sd_utils_id128_get_machine()Thomas Haller2022-04-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | This was only for unit testing, to check whether our reader for "/etc/machine-id" agrees with systemd's. That unit test was anyway flawed, because it actually accesses the machine-id on the test system. Anyway. Drop this. Most likely our parser is good enough, and if we get a bug report with a defect, we can unit test against that.
* | client/test: add test for --offline behaviorlr/nmcli-offlineLubomir Rintel2022-04-191-0/+1
| | | | | | | | | | Currently, only "add" and negative cases are tested. Testing "modify" would require an ability to provide input. Perhaps at some later point.
* | dns/unbound: drop deprecated "unbound" DNS pluginThomas Haller2022-04-151-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "unbound" DNS plugin was very rudimentary and is deprecated since commit 4a2fe09853cd ('man: mark [main].dns=unbound as deprecated') (Jun 2021). It is part of dnssec-trigger tool, but the dnssec-trigger tool doesn't actually use it. Instead it installs a dispatcher script "/usr/lib/NetworkManager/dispatcher.d/01-dnssec-trigger". Especially, since the plugin requires "/usr/libexec/dnssec-trigger-script", which is provided by "dnssec-trigger" package on Fedora. At the same time, the package provides the dispatcher script. So I don't this works or anybody is using this. https://mail.gnome.org/archives/networkmanager-list/2022-April/msg00002.html
* | dhcp/systemd: drop dhcp4 client (and related files)Thomas Haller2022-04-141-15/+0
| | | | | | | | This code is now unused.
* | dhcp: drop internal systemd DHCPv4 clientThomas Haller2022-04-141-2/+0
| | | | | | | | | | | | | | | | | | | | This is long replaced by nettools' n-dhcp4 client. Drop it. We still require NMDhcpSystemd for the DHCPv6 client. Note that "[main].dhcp=systemd" now falls back to the internal client. But this option was undocumented and internal anyway.
* | build/autotools: avoid compiler warning generating "NM-1.0.gir"Thomas Haller2022-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We passed on the CFLAGS, but they also contain "-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40" which causes compiler warnings: GISCAN src/libnm-client-impl/NM-1.0.gir /data/src/NetworkManager/tmp-introspect_17ddrdb/NM-1.0.c: In function ‘dump_object_type’: /data/src/NetworkManager/tmp-introspect_17ddrdb/NM-1.0.c:251:13: warning: Not available before 2.70 251 | if (G_TYPE_IS_FINAL (type)) | ^~~~~~~~~~~~~~~~~ /data/src/NetworkManager/tmp-introspect_17ddrdb/NM-1.0.c: In function ‘dump_fundamental_type’: /data/src/NetworkManager/tmp-introspect_17ddrdb/NM-1.0.c:369:13: warning: Not available before 2.70 369 | if (G_TYPE_IS_FINAL (type)) | ^~~~~~~~~~~~~~~~~ Filter them out. See-also: https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/331
* | systemd: merge branch systemd into mainThomas Haller2022-04-051-0/+2
|\ \ | |/ | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1178
* | build: drop "check-python-black" check from autotoolsThomas Haller2022-04-011-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, autotools would detect whether we have "black" in the path. And if so, it would check formatting during `make check`. That's problematic. When I run `./contrib/fedora/rpm/build_clean.sh -w test` in certain cases, it would pick up black, but then fail with Traceback (most recent call last): File "/usr/bin/black", line 5, in <module> from black import patched_main File "/usr/lib/python3.6/site-packages/black.py", line 42, in <module> from attr import dataclass, evolve, Factory ModuleNotFoundError: No module named 'attr' make[3]: *** [Makefile:21658: check-python-black] Error 1 That's an installation error of black, but still, during package build there is no need to check the formatting. We could export `NMTST_SKIP_PYTHON_BLACK=1` to prevent it, but it's still unnecessary. We check proper formatting in gitlab-ci. That is enough, it doesn't need to run during `make check`. In particular, because `black .` takes 1.5 seconds on my machine.
* | build: move nm-crypto to separate directory "src/libnm-crypto"Thomas Haller2022-03-291-33/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libnm-core currently has a dependency on crypto libraries (either "gnutls", "nss" or "null"). We need this huge dependency for few cases. Move the crypto code to a separate static library"src/libnm-crypto/libnm-crypto.la". The reasoning is that it becomes clearer where we have this dependency, to use it more consciously, and to be better see how it's used. We clearly need the crypto functionality in libnm. But do we also need it in the daemon? Could we ever link the daemon without crypto libraries? The goal of splitting the crypto part out, to better understand the crypto dependency.
* | libnm-base: add "nm-base.c" for implementing stuff from "nm-base.h"Thomas Haller2022-03-291-0/+1
| |
* | doc: rename "README" to "README.md"Thomas Haller2022-03-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By having a ".md" extension, gitlab renders a nice page instead of showing as plain text. Currently our README is pretty bad. Partly, because it doesn't get shown nicely. Rename. The file effectively was already markdown. The old file is gone. For this we also need to change the automake flavor to "foreign" (See [1]). [1] https://autotools.info/automake/options.html#automake.options.flavors
* | linux-headers: add nl80211-vnd-intel.h kernel headerEmmanuel Grumbach2022-03-071-0/+1
| | | | | | | | | | | | | | Take from include/uapi/linux/nl80211-vnd-intel.h Linux 5.17-rc5, cfb92440ee71adcc2105b0890bb01ac3cddb8507 March 1, 2022
* | man: add NetworkManager-wait-online.service.8 manualThomas Haller2022-03-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | NetworkManager-wait-online is a constant source of confusion, as it seems to delay the boot (when it's often just the messenger or either a network problem, a NetworkManager misconfiguration or a misconfiguration of other systemd services). Try to clear that up with a manual page. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1130
* | libnm-crypto: add new option for no cryptographyChristian Eggers2022-02-211-0/+18
| | | | | | | | | | | | | | For some embedded systems, no cryptography is required at all (e.g when only using Ethernet). https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1108
* | platform: rename "nmp-route-manager.h" to "nmp-rules-manager.h"Thomas Haller2022-02-091-2/+2
| |
* | priv-helper: fix D-Bus patch to not contain forbidden character '-'Thomas Haller2022-02-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | "-" is not allowed as D-Bus path and interface name, and discouraged as bus name. This cause nm-priv-helper to crash, because GDBus asserts the the object path is valid. Replace the '-' with '_'. This way, it's consistent with "nm_dispatcher". Fixes: d68ab6b8f02a ('nm-sudo: rename to nm-priv-helper')
* | systemd: merge branch systemd into mainThomas Haller2022-02-031-1/+4
|\ \ | |/ | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1068
* | iwd: Add basic P2P device class for IWDAndrew Zaborowski2022-01-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Similarly as with wpa_supplicant, create NMDeviceIwdP2P objects for P2P devices based on data from IWD -- not in NMWifiFactory::create_device because that is only triggered for system netdevs and a P2P-Device virtual interface has no netdev. Unlike NMDeviceWifiP2P, NMDeviceIwdP2P's iface property is a unique string that likely doesn't match any system interface name -- in theory there doesn't need to be any related netdev on the system (such as an Infrastructure-mode interface) before a P2P-Device is added. [thaller@redhat.com: modified original patch]
* | build/autotools: fix linking libnm-log-null into various executablesThomas Haller2022-01-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Interestingly, on RHEL9 I suddenly get a linker error: libtool: link: gcc -Wall -Werror -Wextra -Wdeclaration-after-statement -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wpointer-arith -Wshadow -Wshift-negative-value -Wstrict-prototypes -Wundef -Wvla -Wno-duplicate-decl-specifier -Wno-format-truncation -Wno-format-y2k -Wno-missing-field-initializers -Wno-pragmas -Wno-sign-compare -Wno-unknown-pragmas -Wno-unused-parameter -Wno-array-bounds -Wunused-value -Wcast-function-type -Wimplicit-fallthrough -fno-strict-aliasing -fdata-sections -ffunction-sections -Wl,--gc-sections -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,--version-script=./linker-script-binary.ver -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -o src/nm-online/.libs/nm-online src/nm-online/nm_online-nm-online.o -Wl,--export-dynamic -pthread src/libnm-client-impl/.libs/libnm.so src/libnm-client-aux-extern/.libs/libnm-client-aux-extern.a /root/NetworkManager/contrib/fedora/rpm/NetworkManager.20220111-121006.2X0NXg/BUILD/NetworkManager-1.35.3/src/libnm-client-impl/.libs/libnm.so -lgnutls -ludev src/libnm-glib-aux/.libs/libnm-glib-aux.a src/libnm-std-aux/.libs/libnm-std-aux.a src/c-siphash/.libs/libc-siphash.a -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -pthread /usr/bin/ld: src/libnm-glib-aux/.libs/libnm-glib-aux.a(libnm_glib_aux_la-nm-time-utils.o): in function `_t_init_global_state': /root/NetworkManager/contrib/fedora/rpm/NetworkManager.20220111-121006.2X0NXg/BUILD/NetworkManager-1.35.3/src/libnm-glib-aux/nm-time-utils.c:73: undefined reference to `_nm_utils_monotonic_timestamp_initialized' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:11437: src/nm-online/nm-online] Error 1 The linker is right. Fix it.
* | nm-sudo: rename to nm-priv-helperBeniamino Galvani2022-01-111-22/+22
| | | | | | | | | | | | | | | | The name "nm-sudo" reminds of the "sudo" tool, and this is a bit confusing because it's not related. Rename the service to "nm-priv-helper", which stands for "NM privileged helper". https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/938
* | build: allow configuring default for wifi.backend settingJames Hilliard2022-01-041-1/+2
| | | | | | | | | | | | | | | | | | Distributions may want to change the default wifi.backend, if for example they are building without wpa_supplicant support. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/869 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1040
* | core: rework IP configuration in NetworkManager using layer 3 configurationThomas Haller2021-11-181-72/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Completely rework IP configuration in the daemon. Use NML3Cfg as layer 3 manager for the IP configuration of an interface. Use NML3ConfigData as pieces of configuration that the various components collect and configure. NMDevice is managing most of the IP configuration at a higher level, that is, it starts DHCP and other IP methods. Rework the state handling there. This is a huge rework of how NetworkManager daemon handles IP configuration. Some fallout is to be expected. It appears the patch deletes many lines of code. That is not accurate, because you also have to count the files `src/core/nm-l3*`, which were unused previously. Co-authored-by: Beniamino Galvani <bgalvani@redhat.com>
* | build: remove NetworkManager.pcLubomir Rintel2021-11-031-1/+0
| | | | | | | | It's not installed at least since libnm-glib was dropped.
* | systemd: merge branch systemd into mainThomas Haller2021-10-081-2/+8
|\ \ | |/
* | platform: drop test-tc-fakeBeniamino Galvani2021-09-201-6/+0
| | | | | | | | It doesn't seem useful to have a copy of the test which does nothing.
* | core: add NML3IPv6LL helperThomas Haller2021-09-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helper class is supposed to encapsulate most logic about configuring IPv6 link local addresses and exposes a simpler API in order to simplify NMDevice. Currently this logic is spread out in NMDevice. Also, NML3IPv6LL directly uses NML3Cfg, thereby freeing NMDevice to care about that too much. For several reasons, NML3IPv6LL works different than NML3IPv4LL. For one, with IPv6 we need to configure the address in kernel, which does DAD for us. So, NML3IPv6LL will tell NML3Cfg to configure those addresses that it wants to probe. For IPv4, it only tells NML3Cfg to do ACD, without configuring anything yet. That is left to the caller.
* | std-aux: add "libnm-std-aux/nm-linux-compat.h" header to avoid build errorsThomas Haller2021-09-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a copy of a few linux user space headers in `src/linux-headers`. The idea is that we want to use recent kernel API, and not depend on the kernel UAPI headers installed on the build system (and not need to workaround that). However, we may not be able to simply compile them, because they too have dependencies. For example, ../src/linux-headers/ethtool.h:1389:2: error: implicit declaration of function '__KERNEL_DIV_ROUND_UP' [-Werror=implicit-function-declaration] __u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)]; ^ As workaround, don't include headers from "linux-headers" directly, but only include the new "libnm-std-aux/nm-linux-compat.h" adapter header, which tries to solve these incompatibilities. Fixes: 34d48d2596f7 ('platform: clear all BASE types when setting advertised modes for ethernet autoneg')
* | platform/build: fix linking "test-nm-platform" testThomas Haller2021-09-061-0/+2
| | | | | | | | | | | | | | | | | | libnm-platform.la depends on libnm-udev-aux and libnm-base. Only by accident this was working, because we happened to use no symbol in the test that required any of these dependencies. A small change to the test can (and will soon) change that. Fix the build to link the right library.
* | linux-headers: add ethtool.h kernel headerThomas Haller2021-09-061-0/+1
| | | | | | | | | | Taken from Linux 5.14, 7d2a07b769330c34b4deabeed939325c77a7ec2f, Aug 30, 2021.
* | Revert "build: add way to keep unused symbols when linking NetworkManager"th/fix-nm-sudo-symbols-for-ovsThomas Haller2021-08-311-10/+0
| | | | | | | | | | | | | | | | This approach does not seem to work with clang 3.4 (rhel-7). Instead, make sure we actually use the symbol in NetworkManager so that it gets preserved for the OVS device plugin. This reverts commit 684f2acffea3ed5704330bff05b87acbf371ccdd.
* | build: sort filename alphabetically in Makefile.am and similarThomas Haller2021-08-261-11/+11
| | | | | | | | | | The question is what "alphabetically" means (as it depends on collation). To me, it means ":sort" in `LANG=en_US.UTF-8 vim`.
* | bond: add support of queue_id of bond portGris Ge2021-08-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced `NMSettingBondPort` to hold the new setting class with single property `NM_SETTING_BOND_PORT_QUEUE_ID`. For dbus interface, please use `bond-port` as setting name and `queue-id` as property name. Unit test cases for ifcfg reader and writer included. Signed-off-by: Gris Ge <fge@redhat.com> https://bugzilla.redhat.com/show_bug.cgi?id=1949127 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/952
* | tui: add WireGuard support to nmtuiJavier Sánchez Parra2021-08-171-0/+6
| | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/736
* | core: get file descriptor to ovsdb unix socket from nm-sudoThomas Haller2021-07-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To talk to ovsdb, we use the unix socket at /var/run/openvswitch/db.sock. But that socket is owned by another user and NetworkManager would need dac_override capability to open it. We want to drop dac_override, but we still need to talk to ovsdb. Add a GetFD() method to nm-sudo. We still first try to open the socket directly. Maybe it just works. Note that SELinux may block passing file descriptors from nm-sudo. If it doesn't work for you, test with SELinux permissive mode and wait for an SELinux update.
* | sudo: introduce nm-sudo D-Bus serviceThomas Haller2021-07-261-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NetworkManager runs as root and has lots of capabilities. We want to reduce the attach surface by dropping capabilities, but there is a genuine need to do certain things. For example, we currently require dac_override capability, to open the unix socket of ovsdb. Most users wouldn't use OVS, so we should find a way to not require that dac_override capability. The solution is to have a separate, D-Bus activate service (nm-sudo), which has the capability to open and provide the file descriptor. For authentication, we only rely on D-Bus. We watch the name owner of NetworkManager, and only accept requests from that service. We trust D-Bus to get it right a request from that name owner is really coming from NetworkManager. If we couldn't trust that, how could PolicyKit or any authentication via D-Bus work? For testing, the user can set NM_SUDO_NO_AUTH_FOR_TESTING=1. https://bugzilla.redhat.com/show_bug.cgi?id=1921826
* | build: add way to keep unused symbols when linking NetworkManagerThomas Haller2021-07-261-0/+8
| | | | | | | | | | | | | | | | | | NetworkManager (and NetworkManager-all-sym) must not only contain symbols that are used by itself. Also the device and settings plugin are dlopen'd by NetworkManager and use symobls form the binary. That means, if a symbols is only used by a plugin, then we must make sure that the linker keeps it in the binary. Add a mechanism for that.
* | build: fix calling test "check-local-devices-ovs" to check OVS device pluginThomas Haller2021-07-261-0/+2
| |
* | cloud-setup: link with libnm-log-nullThomas Haller2021-07-231-0/+2
| |
* | cloud-setup: configure secondary ip in Aliyun cloudWen Liang2021-07-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a tool for automatically configuring networking in Aliyun cloud environment. This add a provider implementation for Aliyun that when detected fetches the private ip addressess and the subnet prefix of IPv4 CIDR block. Once this information is fetched from the metadata server, it instructs NetworkManager to add private ip addressess and subnet prefix for each interface detected. It is inspired by SuSE's cloud-netconfig ([1], [2]) and Aliyun Instance Metadata [3]. [1] https://www.suse.com/c/multi-nic-cloud-netconfig-ec2-azure/ [2] https://github.com/SUSE-Enceladus/cloud-netconfig [3] https://www.alibabacloud.com/help/doc-detail/49122.htm It is also intended to work without configuration. The main point is that you boot an image with NetworkManager and nm-cloud-setup enabled, and it just works. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/885 Signed-off-by: Wen Liang <liangwen12year@gmail.com>
* | glib-aux: use nm_utils_gettid() instead of gettid()Thomas Haller2021-07-081-0/+2
| | | | | | | | | | | | | | I missed that we already have a gettid() wrapper. Drop the duplicated again and use nm_utils_gettid(). Fixes: e874c5bf6b78 ('random: Provide missing gettid() declaration')
* | build: fix linking libnm-log-null into different test programsThomas Haller2021-07-051-0/+3
| | | | | | | | | | We require these, otherwise we can get a linker error about _nm_utils_monotonic_timestamp_initialized symbol being undefined.
* | ifcfg-rh/tests: add unit test for persisting NMSettingEthtoolThomas Haller2021-06-251-1/+6
| | | | | | | | | | | | In particular the case with an all-default NMSettingEthtool is currently broken. The test is checking the wrong behavior, which will be fixed next.
* | core: add infrastructure for spawning a helper processBeniamino Galvani2021-06-111-0/+25
| | | | | | | | (cherry picked from commit 6ac21ba916b3def3172773b774989c9f4d66ec6d)
* | ifcfg-rh: preserve an empty tc configurationbg/tc-ignoreBeniamino Galvani2021-06-031-0/+1
| | | | | | | | | | | | If the TC setting contains no qdiscs and filters, it is lost after a write-read cycle. Fix this by adding a new property to indicate the presence of the (empty) setting.
* | systemd: move "src/core/systemd" to "src/libnm-systemd-core"Thomas Haller2021-05-301-90/+87
| | | | | | | | | | | | | | | | | | | | This follows the recently introduced naming scheme and directory layout. "libnm-systemd-core" is an independent component, and as such should no be inside "src/core/". Move it. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/875
* | firewall: add new "nm-firewall-utils.[ch]" moduleThomas Haller2021-05-071-0/+2
| |
* | firewall: rename "nm-firewall-manager.[ch]" to "nm-firewalld-manager.[ch]"Thomas Haller2021-05-061-2/+2
| | | | | | | | | | | | We will add a general "firewall-manager", so rename the firewalld related file. This commit only renames the file. The next commit will change the symbol naming.
* | core: add "nm-device-utils.[ch]" with simple helper functionsThomas Haller2021-05-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | "nm-device.c" is huge, and it does complicated things like handling the state of the device and IP configuration. It also contains simpler, individual functions, like converting enums to strings. Let's move those trivial functions to a new module, so that the remaining part is smaller. "nm-device-utils.[ch]" should only contain simpler functions that have no complex behavior or state. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/840