Commit graph

25848 commits

Author SHA1 Message Date
Antonio Cardace
3e50221d7e
ethtool: refactor coalesce settings using gendata APIs
https://bugzilla.redhat.com/show_bug.cgi?id=1614700
2020-05-20 10:55:01 +02:00
Antonio Cardace
55d2df6658
nm-setting: use nm_setting_gendata_clear_all() to clear features
https://bugzilla.redhat.com/show_bug.cgi?id=1614700
2020-05-20 10:55:01 +02:00
Antonio Cardace
e08c3a6e18
nm-setting: add internal gendata API to clear value(s)
The filter function in nm_setting_gendata_clear_all() is useful
for when you want to only clear values according to a predicate,
if no such function is supplied all values will be cleared.

https://bugzilla.redhat.com/show_bug.cgi?id=1614700
2020-05-20 10:55:01 +02:00
Antonio Cardace
572f82a77b
nm-setting: add internal gendata API to get/set uint32
https://bugzilla.redhat.com/show_bug.cgi?id=1614700
2020-05-20 10:55:01 +02:00
Thomas Haller
12063d6cb6
platform: simplify NMEthtoolCoalesceState to only track one state
Only in one moment we need the old and requested settings together:
during _ethtool_coalesce_set(). But for that we shouldn't track both
states in "NMEthtoolCoalesceState".

Simplify "NMEthtoolCoalesceState" to only contain one set of options.
By tracking less state, the code becomes simpler, because you don't
need to wonder where the old and requested state is used.
2020-05-20 10:54:57 +02:00
Thomas Haller
d71f920f2e
license: add Daniel and Endless OS LLC to RELICENSE.md
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/390#note_503229
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/390#note_504774
2020-05-20 09:09:37 +02:00
Beniamino Galvani
02ea74c920 core: signal parent-active only when the parent AC is activated
The parent-active signal is used by the manager to determine when the
parent active-connection is ready and a connection that depend on it
can proceed.

The AC state could transition from ACTIVATING directly to
DEACTIVATING; in such case we should not emit the signal but instead
just stop watching the parent AC.

Fixes: 6e382ea91d ('active-connection: add parent active connection tracking')
https://bugzilla.redhat.com/show_bug.cgi?id=1778073
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/510
2020-05-19 21:40:51 +02:00
Thomas Haller
18deaa39c7
mailmap: fix identity for gunchleoc 2020-05-19 18:19:51 +02:00
Thomas Haller
ecc5425bdd
cli: merge branch 'th/wireguard-import-dns-search'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/502
2020-05-19 18:07:44 +02:00
Thomas Haller
753cc7b79b
libnm: use correct free macro for buffer in nm_utils_base64secret_decode()
In practice, g_free() and free() are the same. Still, avoid mixing the
APIs and use free() as plain malloc() was used to allocate the buffer.
2020-05-19 18:07:31 +02:00
Thomas Haller
3ab082ed96
cli: support dns-search for import of WireGuard profiles
wg-quick now supports specifying DNS searches as part of
DNS= setting.

See-also: https://lists.zx2c4.com/pipermail/wireguard/2020-May/005415.html
See-also: https://git.zx2c4.com/wireguard-tools/commit/?id=7f236c79570642d466c5acab890b26c3a07f4f7a
2020-05-19 18:05:55 +02:00
Thomas Haller
7e023e53e8
mailmap: update mailmap information for Antony 2020-05-19 18:01:26 +02:00
Thomas Haller
02e36c1dca
license: merge branch 'onlymee:patch-1'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/511
2020-05-19 17:54:33 +02:00
Antony Mee
d7dca08147 Added approval to RELICENSE.md 2020-05-19 10:41:14 +00:00
Thomas Haller
4fc92aa604
license: add Przemysław to RELICENSE.md
https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00013.html
2020-05-19 11:42:59 +02:00
Thomas Haller
0480448e66
n-dhcp4: style fix in n_dhcp4_client_probe_transition_accept()
The upstream fix also doesn't have this whitespace.
Keep the sources in sync.

0be7033dd9
2020-05-18 09:54:28 +02:00
Thomas Haller
33a67c9f15
license: add luzpaz to RELICENSE.md
https://github.com/NetworkManager/NetworkManager/pull/205#issuecomment-629638948
2020-05-17 21:37:53 +02:00
Thomas Haller
6c7d910a7d
license: add Aleksander to RELICENSE.md
https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00012.html
2020-05-16 11:57:39 +02:00
Thomas Haller
4b0886ef13
license: add Evan to RELICENSE.md
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/390#note_501410
2020-05-16 09:33:52 +02:00
Thomas Haller
4f7c05a320
license: add companies to RELICENSE.md 2020-05-15 21:51:06 +02:00
Thomas Haller
fcbdaf3fdd
license: add Pantelis to RELICENSE.md
https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00011.html
2020-05-15 21:28:33 +02:00
Thomas Haller
1055631eb3
mailmap: update mailmap for Ray (halfline) 2020-05-15 21:25:12 +02:00
Thomas Haller
f1071f949b
license/RELICENSE: merge branch 'halfline:patch-1'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/509
2020-05-15 21:22:30 +02:00
Thomas Haller
16c913a14a
license: add Mario to RELICENSE.md
https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00010.html
2020-05-15 21:18:52 +02:00
Thomas Haller
477dfa3190
license: add Giovanni to RELICENSE.md
https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00009.html
2020-05-15 21:15:48 +02:00
Thomas Haller
901326e439
license: add Colin to RELICENSE.md
https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00008.html
2020-05-15 21:13:52 +02:00
Ray Strode
e922c9989f Update RELICENSE.md to include halfline 2020-05-15 18:10:41 +00:00
Olivier Gayot
0b9f0b3080
nmtui: show error on connection deactivation failure
When a failure occurs on deactivation of a connection, no error was
shown on the TUI client. It was not obvious if anything was actually
happening after pressing the <Deactivate> button.

This patch shows the error in a dialog just like we do when a failure
occurs on activation of a connection.

https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00004.html
2020-05-15 19:27:09 +02:00
Beniamino Galvani
779e5c0efb core: merge branch 'bg/shared-mode-firewall-rh1829637'
https://bugzilla.redhat.com/show_bug.cgi?id=1829637
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/498
2020-05-15 19:06:38 +02:00
Beniamino Galvani
016a82e6dd contrib/rpm: enable the firewalld zone in F32 and RHEL8 2020-05-15 19:06:24 +02:00
Beniamino Galvani
3e2b723532 device: use the nm-shared firewalld zone in shared mode
When the interface is in IPv4 or IPv6 shared mode and the user didn't
specify an explicit zone, use the nm-shared one.

Note that masquerade is still done through iptables direct calls
because at the moment it is not possible for a firewalld zone to do
masquerade based on the input interface.

The firewalld zone is needed on systems where firewalld is using the
nftables backend and the 'iptables' binary uses the iptables API
(instead of the nftables one). On such systems, even if the traffic is
allowed in iptables by our direct rules, it can still be dropped in
nftables by firewalld.
2020-05-15 19:06:24 +02:00
Beniamino Galvani
c8b5bf402d build: install a firewalld zone for shared mode
Install a NM-specific firewalld zone to be used for interfaces that
are used for connection sharing. The zone blocks all traffic to the
local machine except some protocols (DHCP, DNS and ICMP) and allows
all forwarded traffic.
2020-05-15 19:06:24 +02:00
Thomas Haller
fb0d59689c
mailmap: update Chrstopher Aillon mailmap entry 2020-05-15 18:51:31 +02:00
Beniamino Galvani
2d8c87e22e ip-tunnel: merge branch 'bg/ip-tunnel-cloned-mac-rh1832170'
https://bugzilla.redhat.com/show_bug.cgi?id=1832170
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/503
2020-05-15 09:49:06 +02:00
Beniamino Galvani
fa4fbd3333 ip-tunnel: set ip6gretap MAC address when creating the link 2020-05-15 09:48:25 +02:00
Beniamino Galvani
0494a84878 ip-tunnel: set cloned-mac-address only for layer2 tunnel devices
For ip-tunnel modes that encapsulate layer2 packets (gretap and
ip6gretap) we allow the presence of an ethernet setting in the
connection and honor the cloned-mac-address specified in it.

For all other modes, the ethernet setting is removed during
normalization, but a value different from 'preserve' could be set via
global default.

The kernel doesn't allow setting a MAC for layer3 devices, don't do
it.
2020-05-15 09:48:25 +02:00
Beniamino Galvani
48c93b3bba libnm-core: add _nm_ip_tunnel_mode_is_layer2() 2020-05-15 09:48:25 +02:00
Yuri Chornoivan
623cb3dc87
po: update Ukrainian (uk) translation
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/504
2020-05-15 09:40:12 +02:00
Thomas Haller
8d2f6dfe38
contrib/rpm: no longer mention that libnm is "new API"
libnm was introduced in version 1.0, December 2014. It's
no longer new, and libnm-glib is forgotten.
2020-05-14 17:21:12 +02:00
Thomas Haller
ef9fe85096
shared: move _nm_utils_format_variant_attributes*() API to "shared/nm-glib-aux"
This has no dependency on libnm, libnm-core, or src. Move it to the
general purpose toolbox.
2020-05-14 17:21:12 +02:00
Antonio Cardace
61d6f1abc2
cli: let nmcli remove individual coalesce settings
Remove coalesce settings by setting them to NULL.

eg:
$ nmcli c mod $conn ethtool.$coalesce-setting ''
2020-05-14 17:06:41 +02:00
Thomas Haller
01667694ca
all: merge branch 'th/ubsan-fixes'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/505
2020-05-14 13:37:04 +02:00
Thomas Haller
350681e7f1
contrib/rpm: enable undefined-sanitizer libubsan on RHEL-8 2020-05-14 12:19:34 +02:00
Thomas Haller
9119e5b618
build/autotools: fix linking nm-online,nm-dispatcher,nm-bt-test with sanitizer flags 2020-05-14 12:19:34 +02:00
Thomas Haller
1acb351848
build/autotools: reject invalid sanitizer options in configure.ac 2020-05-14 12:19:34 +02:00
Thomas Haller
5198bce5ee
clients/tests: set "UBSAN_OPTIONS" to abort tests and set "ASAN_OPTIONS=detect_leaks=1" 2020-05-14 12:19:34 +02:00
Thomas Haller
c6234e114b
clients/tests: preserve caller's ASAN/LSAN/UBSAN environment variables for client tests 2020-05-14 12:19:33 +02:00
Thomas Haller
8113bc22d4
tests/sanitizer: suppress leak in openssl
Suppress a leak report from openssl:

 Direct leak of 192 byte(s) in 1 object(s) allocated from:
     #0 0x7f6fe9c6b677 in __interceptor_malloc (/lib64/libasan.so.6+0xb0677)
     #1 0x7f6fe4d4046d in CRYPTO_zalloc crypto/mem.c:230
     #2 0x7f6fe4d0a91f in ENGINE_new crypto/engine/eng_lib.c:34
     #3 0x7f6fe4d0c40d in ENGINE_rdrand crypto/engine/eng_rdrand.c:70
     #4 0x7f6fe4d0c40d in engine_load_rdrand_int crypto/engine/eng_rdrand.c:85
     #5 0x7f6fe4d370ec in ossl_init_engine_rdrand crypto/init.c:353
     #6 0x7f6fe4d370ec in ossl_init_engine_rdrand_ossl_ crypto/init.c:347
     #7 0x7f6fe995aace in __pthread_once_slow (/lib64/libpthread.so.0+0x11ace)
     #8 0x7f6fe4da68fc in CRYPTO_THREAD_run_once crypto/threads_pthread.c:118
     #9 0x7f6fe4d378ec in OPENSSL_init_crypto crypto/init.c:723
     #10 0x7f6fe4d378ec in OPENSSL_init_crypto crypto/init.c:620
     #11 0x7f6fe5292280  (/usr/lib64/pkcs11/libsofthsm2.so+0x78280)
     #12 0x7f6fe5292364  (/usr/lib64/pkcs11/libsofthsm2.so+0x78364)
     #13 0x7f6fe526f151 in SoftHSM::C_Initialize(void*) /usr/src/debug/softhsm-2.5.0-4.fc32.3.x86_64/src/lib/SoftHSM.cpp:485
     #14 0x7f6fe523cc97 in C_Initialize (/usr/lib64/pkcs11/libsofthsm2.so+0x22c97)
     #15 0x7f6fe4ecb233 in initialize_module_inlock_reentrant ../p11-kit/modules.c:738
     #16 0x7f6fe4ecb382 in managed_C_Initialize ../p11-kit/modules.c:1584
     #17 0x7f6fe4ecdbdf in p11_kit_modules_initialize ../p11-kit/modules.c:2157
     #18 0x7f6fe4ecdbdf in p11_kit_modules_initialize ../p11-kit/modules.c:2145
     #19 0x7f6fe4ed1a96 in proxy_create ../p11-kit/proxy.c:330
     #20 0x7f6fe4ed1a96 in proxy_C_Initialize ../p11-kit/proxy.c:398
     #21 0x7f6fe9a343b1 in secmod_ModuleInit /usr/src/debug/nss-3.51.0-1.fc32.x86_64/nss/lib/pk11wrap/pk11load.c:244
     #22 0x7f6fe9a34adb in secmod_LoadPKCS11Module /usr/src/debug/nss-3.51.0-1.fc32.x86_64/nss/lib/pk11wrap/pk11load.c:501
     #23 0x7f6fe9a419ec in SECMOD_LoadModule /usr/src/debug/nss-3.51.0-1.fc32.x86_64/nss/lib/pk11wrap/pk11pars.c:1840
     #24 0x7f6fe9a41b27 in SECMOD_LoadModule /usr/src/debug/nss-3.51.0-1.fc32.x86_64/nss/lib/pk11wrap/pk11pars.c:1876
     #25 0x7f6fe9a0dd00 in nss_Init /usr/src/debug/nss-3.51.0-1.fc32.x86_64/nss/lib/nss/nssinit.c:712
     #26 0x7f6fe9a0e3ab in NSS_NoDB_Init /usr/src/debug/nss-3.51.0-1.fc32.x86_64/nss/lib/nss/nssinit.c:950
     #27 0x55c942e2f1b2 in _nm_crypto_init libnm-core/nm-crypto-nss.c:61
     #28 0x55c942d6f2da in nm_crypto_load_and_verify_certificate libnm-core/nm-crypto.c:721
     #29 0x55c942c99681 in _cert_impl_set libnm-core/nm-setting-8021x.c:497
     #30 0x55c942c9d83b in nm_setting_802_1x_set_ca_cert libnm-core/nm-setting-8021x.c:1033
     #31 0x55c942c63513 in _test_8021x_cert_from_files libnm-core/tests/test-keyfile.c:382
     #32 0x55c942c6425a in test_8021x_cert libnm-core/tests/test-keyfile.c:436
     #33 0x7f6fe965429d in test_case_run ../glib/gtestutils.c:2633
     #34 0x7f6fe965429d in g_test_run_suite_internal ../glib/gtestutils.c:2721
2020-05-14 12:03:24 +02:00
Thomas Haller
42d45299f9
tests/sanitizer: make ASAN/LSAN/UBSAN options configurable in "tools/run-nm-test.sh"
Also add a suppressions file for LSAN.
2020-05-14 12:03:24 +02:00
Thomas Haller
0a030da6c2
gitlab-ci: add more CentOS images for tests 2020-05-14 12:03:24 +02:00