summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gitlab-ci: skip valgrind tests on Alpine Linuxth/gitlab-ci-alpineThomas Haller2020-12-221-0/+6
| | | | | We don't have debug symbols, so valgrind suppressions don't work. Skip those checks.
* gitlab-ci: install missing packages on Alpine LinuxThomas Haller2020-12-222-1/+4
| | | | | | The "contrib/alpine/REQUIRED_PACKAGES" script is also used by gitlab-ci to setup the test container. These packages are required for unit tests.
* all: adjust imports to fix libc/linux headersThomas Haller2020-12-223-3/+7
| | | | | | | | | | | | | | | | Linux headers and some libc headers have overlapping defines for network types and functions. In the past years, glibc and linux headers were improved to cooperate so you could include either one, in any order. With musl and possibly some older glibc versions that doesn't work so well. Reorder and change includes to make it work better. Yes, this looks pretty random and unmotivated. The includes are changed in order to successfully build on various libc/kernel versions, with the goal of not using #if.
* systemd: use pthread instead of internal glibc functionality on non glibc ↵Thomas Haller2020-12-221-0/+12
| | | | platform
* systemd: fix include for <linux/if_arp.h> on muslRasmus Thomsen2020-12-221-0/+4
| | | | | | | Due to mixing includes of userspace network headers (net/*) and kernelspace onces (linux/if*) symbol redefinitions happen on musl. [thaller@redhat.com: modified original patch]
* core/tests: relax checks in do_test_nm_utils_kill_child() for libmuslThomas Haller2020-12-221-2/+2
| | | | | | | | We were asserting against error messages from strerror(), and on libmusl these are different. Relax the checks. We still assert against parts of the text, where possible. So a similar problem could happen in the future or with another libc library.
* core/tests: skip test for nm_wildcard_match_check() on non-glibcThomas Haller2020-12-221-5/+13
| | | | | | | It seems musl's fnmatch() does not support ranges and fails the test. Skip it. Seen on musl-1.1.24-r10.
* wifi: merge branch 'ac/wpa3eap_suiteb192'Antonio Cardace2020-12-2224-56/+267
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/709
| * wifi: add WPA-EAP-SUITE-B-192 supportac/wpa3eap_suiteb192Antonio Cardace2020-12-2224-56/+267
| | | | | | | | | | | | | | | | | | Add a new key management option to support WPA3 Enteprise wifi connection. Only supported with wpa_supplicant for the time being. Signed-off-by: Antonio Cardace <acardace@redhat.com>
* | merge branch 'th/gitlab-ci-alpine' (part 3)Thomas Haller2020-12-2252-14/+95
|\ \ | | | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/704
| * | libnm: allow opt-out of including system headers in <NetworkManager.h>Thomas Haller2020-12-223-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In public libnm headers we include some libc/linux headers, although libnm doesn't strictly need them. The <linux/*.h> headers conflict with some network headers provided by libc and they need to be included in the right order. As <NetworkManager.h> drags in some linux headers, this makes it unnecessarily complicated. It also feels ugly to include headers we don't need, only for the sake of convenience. Allow to opt out. Also, for internal build, don't do this. When building NetworkManager we need control about the headers and their order of inclusion.
| * | libnm: avoid in_addr_t/in6addr use in libnm headerThomas Haller2020-12-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "in_addr_t" and "struct in6_addr" require headers from libc (or linux). In particular, some libc headers conflict with the linux headers (or they have to be included in a specific order). To avoid that we want that our libnm headers include a minimum of other headers (and only drag in glib headers, which we anyway need). - instead of "in_addr_t", use guint32. For all practical purposes, "in_addr_t" is a plain 32 bit integers and we can do this replacement in our public headers. - forward declare "struct in6_addr".
| * | all: explicit include <linux/if_{ether,infiniband,vlan}.h> as neededThomas Haller2020-12-2246-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently libnm headers include <linux/if_{ether,infiniband,vlan}.h>. These are public headers, that means we drag in the linux header to all users of <NetworkManager.h>. Often the linux headers work badly together with certain headers from libc. Depending on the libc version, you have to order linux headers in the right order with respect to libc headers. We should do better about libnm headers. As a first step, assume that the linux headers don't get included by libnm, and explicitly include them where they are needed.
| * | core: avoid "__u32","__u8" types in "src/nm-manager.c"Thomas Haller2020-12-221-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These typedefs are defined by some libc headers, and we drag them in by including some other standard headers. It's not clear which headers we exactly need for them, and that all libcs provide them the same. Instead, just avoid them.
| * | libnm: include "nm-core-enum-types.h" in libnm headers with quotesThomas Haller2020-12-222-2/+2
|/ / | | | | | | | | | | | | | | In C, includes with <> are for system headers, while "" prefers the current working directory (implementation defined). For libnm headers that include other libnm headers, we tend to use "" instead of <>. That makes sense to me. Be consistent about that.
* | Merge branch 'missing_veth_prop' into 'master'Fernando Fernández Mancera2020-12-222-0/+9
|\ \ | |/ |/| | | | | nmtui: list veth devices when creating the connection See merge request NetworkManager/NetworkManager!708
| * nmtui: fix listing veth devices on nmtuiFernando Fernandez Mancera2020-12-212-0/+9
|/ | | | | | | When activating a connection using nmtui, veth connections where not being listed. This patches fixes this and they are now being listed. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
* ovs: fix indentationBeniamino Galvani2020-12-181-2/+1
| | | | Fixes: ec7d8ddb295b ('ovs: fix leaks')
* hostname: merge branch 'bg/hostname-dns-fix'Beniamino Galvani2020-12-183-6/+67
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/710/
| * hostname: start a new lookup every time the DNS configuration changesbg/hostname-dns-fixBeniamino Galvani2020-12-183-4/+49
| | | | | | | | | | | | | | | | If the DNS configuration changes, the hostname previously determined via reverse DNS lookup could be stale. Clear the resolver data of every interface and try again. Fixes: 09c83871144a ('policy: use the hostname setting')
| * device: log dns resolver state as stringBeniamino Galvani2020-12-171-2/+18
|/
* ovs: fix leaksBeniamino Galvani2020-12-151-2/+2
| | | | Fixes: 1eeca3c606ab ('core/ovs: track external-ids for cached ovsdb objects')
* merge branch 'ffmancera/eth_prio'Beniamino Galvani2020-12-147-4/+22
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/707
| * libnm: adjust nm_device_get_type_description for VethFernando Fernandez Mancera2020-12-142-2/+8
| | | | | | | | | | | | | | | | Veth interfaces should be shown as Ethernet from nm_device_get_type_description in order to provide backward compatibility. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
| * libnm: NMDeviceEthernet uses PRIO_20 instead of PRIO_30Fernando Fernandez Mancera2020-12-145-2/+14
|/ | | | | | | | | | As NMDeviceVeth has a NMDeviceEthernet as parent, it should use PRIO_20 in order to report NMDeviceVeth when configured and do not report NMDeviceEthernet. An unit test case has been added. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
* release: bump version to 1.29.6 (development)1.29.6-devBeniamino Galvani2020-12-142-2/+2
|
* Revert "ovs: clean up interfaces from ovsdb at startup"Beniamino Galvani2020-12-141-46/+0
| | | | | | | The commit breaks ovs system interfaces on daemon restart. Revert the change until a better solution is found. This reverts commit e5113a7fd91b42ff16ff675660cdc27fae0bd80c.
* merge branch 'th/gitlab-ci-alpine' (part 2)Thomas Haller2020-12-1314-9/+28
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/704
| * systemd: don't use qsort_r() on muslRasmus Thomsen2020-12-131-0/+2
| | | | | | | | [thaller@redhat.com: modified original patch]
| * systemd: add missing definitions for __compar_d_fn_t with muslRasmus Thomsen2020-12-131-0/+7
| |
| * systemd: don't include <printf.h>Thomas Haller2020-12-131-0/+2
| | | | | | | | It doesn't exist on alpine/musl.
| * systemd: include <fcntl.h> instead of <sys/fctnl.h>Thomas Haller2020-12-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | On alpine/musl we get a compiler warning: CC shared/systemd/src/basic/libnm_systemd_shared_la-env-file.lo In file included from ../shared/systemd/src/basic/fileio.h:9, from ../shared/systemd/src/basic/env-file.c:10: /usr/include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror=cpp] 1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> | ^~~~~~~
| * shared/nm-glib-aux: don't use RTLD_DEEPBIND on muslRasmus Thomsen2020-12-131-0/+10
| | | | | | | | [thaller@redhat.com: original patch modified]
| * shared: fix _POSIX_C_SOURCE not being defined for nm-errno.cThomas Haller2020-12-131-1/+1
| | | | | | | | | | | | This is the case with musl. Based-on-patch-by: Rasmus Thomsen <oss@cogitri.dev>
| * libnm: replace <netinet/ether.h> by <net/ethernet.h>/<net/if_arp.h> in ↵Thomas Haller2020-12-131-1/+2
| | | | | | | | | | | | | | | | | | | | "nm-utils.c" Including <netinet/ether.h> with musl leads to a conflict with <linux/if_ether.h>, due to redefining ethhdr struct. As we include <linux/if_ether.h> in "nm-utils.h", that is a problem. Avoid that, by including other headers.
| * all: remove unnecessary <netinet/ether.h> includesThomas Haller2020-12-137-7/+0
|/ | | | | | | | <netinet/ether.h> with musl defines ethhdr struct, which conflicts with <linux/if_ether.h>. The latter is included by "nm-utils.h", so this is a problem. Drop includes of "netinet/ether.h" that are not necessary.
* core: log whether assertions are enabled for the buildThomas Haller2020-12-111-2/+3
|
* gitlab-ci: merge branch 'th/gitlab-ci-alpine' (part 1)Thomas Haller2020-12-117-8/+124
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/704
| * gitlab-ci: enable test build on alpine linuxThomas Haller2020-12-116-6/+122
| | | | | | | | | | | | | | | | | | | | | | | | Alpine is especially interesting because it uses musl as libc. The build does not yet succeed. There are several issues that need to be fixed. However, it will be simpler to fix things, if we have tests in place -- even if at the moment they are known to be broken. See-also: https://git.alpinelinux.org/aports/tree/community/networkmanager?h=master
| * gitlab-ci: update used "ci-templates" versionThomas Haller2020-12-112-6/+6
|/
* gitlab-ci: fix failure to enable PowerTools on CentOS8 buildThomas Haller2020-12-112-3/+4
| | | | | Seems that the repository was renamed (or can sometimes have a different name). Try both the "PowerTools" and "powertools" name.
* man,cloud-setup: merge branch 'th/man-nm-cloud-setup'Thomas Haller2020-12-118-5/+293
|\ | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1867997 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/600 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/701
| * man: add `man 8 nm-cloud-setup`Thomas Haller2020-12-117-0/+281
| | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1867997 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/ ## 600
| * cloud-setup: simplify cancellation in _get_config_fetch_cancelled_cb()Thomas Haller2020-12-111-4/+1
| | | | | | | | | | | | | | | | | | | | If we call g_cancellable_connect() on a GCancellable that is already cancelled, then the callback is invoked synchronously. We need to handle that. However, we can slightly simplify the code. There is no change in behavior, but we can always let the cancelled callback return the result.
| * cloud-setup: in EC2's _get_config_task_maybe_return() cancel internal ↵Thomas Haller2020-12-111-0/+2
| | | | | | | | | | | | | | | | requests on any error "iface_data->cancellable" is an internal cancellable for the parallel HTTP requests. Once we encounter a failure, those requests are all obsolete and must be cancelled.
| * cloud-setup: fix handling cancellation of internal GET operation for EC2 ↵Thomas Haller2020-12-111-1/+9
|/ | | | | | | | | | | | | | | | | provider There are two GCancellable at work: one is provided by the user during nmcs_provider_get_config(), and one is used internally for the individual HTTP GET requests. In _get_config_fetch_done_cb(), if the error reason is "cancelled", then it means that our internal iface_data->cancellable was cancelled. Probably because an error happend (like a timeout or the user cancelled the external GCancellable). In that case, we must not report that the task completed with a cancellation, because we need to preserve the error that was the original cause.
* all: avoid GNU "which" from shell scriptsThomas Haller2020-12-119-14/+14
| | | | | | "which" is a separate package and may not be installed. Also, shell has a built-in command for the same purpose. Use that.
* tools: improve detection of "ci-fairy" command in "tools/check-gitlab-ci.sh"Thomas Haller2020-12-111-1/+1
| | | | | | | | | The previous implementation would print ./tools/check-gitlab-ci.sh: line 22: ci-fairy: command not found also, it's not nice to execute the program, just to find out whether we have it.
* tests: skip "check-local-gitlab-ci" test on gitlab-ciThomas Haller2020-12-111-0/+6
|
* tests: allow to skip check-local-gitlab-ci via "$NMTST_SKIP_CHECK_GITLAB_CI"Thomas Haller2020-12-111-0/+4
| | | | | | | | | | | This will be used on our gitlab-ci tests. We do have a separate, dedicated test on gitlab-ci for checking that "gitlab-ci.yml" is correct. We may intentionally want to violate that condition, but then our `make check` should not fail. Add a way to skip that test.