NetworkManager/src/core
Thomas Haller e99433866d
platform/tests: ignore ip-tunnel interfaces in nmtstp_assert_platform()
Certain ip-tunnel modules automatically create network interfaces (for
example, "ip_gre" module creates "gre0" and others).

Btw, that's not the same as `modprobe bonding max_bonds=1`, where
loading the module merely automatically creates a "bond0" interface. In
case of ip tunnel modules, these generated interfaces seem essential to
how the tunnel works, for example they cannot be deleted. I don't
understand the purpose of those interfaces, but they seem not just
regular tunnel interfaces (unlike, "bond0" which is a regular bond
interface, albeit automatically created).

Btw, if at the time when loading the module, an interface with such name
already exists, it will bump the name (for example, adding a "gre1"
interfaces, and so on). That adds to the ugliness of the whole thing,
but for our unit tests, that is no problem. Our unit tests run in a
separate netns, and we don't create conflicting interfaces. That is, an
interface named "gre0" is always the special tunnel interface and we
can/do rely on that.

Note that when the kernel module gets loaded, it adds those interfaces
to all netns. Thus, even if "test-route-linux" does not do anything with
ip tunnels, such an interface can always appear in a netns, simply by
running "test-link-linux" (or any other tool that creates a tunnel) in
parallel or even in another container.

Theoretically, we could just ensure that we load all the conflicting
ip-tunnel modules (with nmtstp_ensure_module()). There there are two
problems. First, there might be other tunnel modules that interfere but
are not covered by nmtstp_ensure_module(). Second, when kernel creates
those interfaces, it does not send correct RTM_NEWLINK notifications (a
bug), so our platform cache will not be correct, and
nmtstp_assert_platform() will fail.

The only solution is to detect and ignore those interfaces.  Also,
ignore all interfaces of link-type "unknown". Those might be from other
modules that we don't know about and that exhibit the same problem.
2023-01-30 08:19:51 +01:00
..
devices device: use NMUnmanFlagOp enum members instead of literals 2023-01-27 14:47:31 +01:00
dhcp dhcp: fix test for out-of-tree build 2023-01-11 10:54:01 +01:00
dns dns-manager: always apply options from [global-dns] 2023-01-26 09:02:16 +01:00
dnsmasq all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
ndisc ndisc: Accept routes from on-link prefixes form ra 2023-01-23 16:50:08 +00:00
platform platform/tests: ignore ip-tunnel interfaces in nmtstp_assert_platform() 2023-01-30 08:19:51 +01:00
ppp all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
settings libnm,platform: fix range for "weight" property of next hops for routes 2023-01-17 14:05:13 +01:00
supplicant all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
tests l3cfg/tests: temporarily disable failing tests "/l3cfg/$N" 2023-01-30 08:18:44 +01:00
vpn all: add new "ipv[46].auto-route-ext-gw" setting 2023-01-09 09:35:52 +01:00
main-utils.c main: use helper function to write pid file in nm_main_utils_write_pidfile() 2022-10-25 13:12:49 +02:00
main-utils.h core: move nm_main_utils_get_nm_[ug]id() to "nm-core-utils.h" 2022-01-18 18:10:55 +01:00
main.c core: support "nm.debug" kernel command line to enable verbose logging 2022-07-18 15:00:04 +02:00
meson.build support loopback interface 2022-11-23 20:51:22 +01:00
NetworkManagerUtils.c platform: allow setting multi_idx instance for NMPlatform 2023-01-19 08:56:21 +01:00
NetworkManagerUtils.h core: increase NM_SHUTDOWN_TIMEOUT_MAX_MSEC to 5 sec to cover pppd 2022-02-24 09:38:53 +01:00
nm-act-request.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-act-request.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-active-connection.c core: obfuscate pointer value in logging in "nm-active-connection.c" 2022-09-29 14:40:12 +02:00
nm-active-connection.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-audit-manager.c audit: handle error from audit_encode_nv_string() 2022-05-11 17:06:12 +02:00
nm-audit-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-auth-manager.c all: fix deprecated function declaration without a prototype 2022-10-11 17:21:11 +02:00
nm-auth-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-auth-utils.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-auth-utils.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-bond-manager.c core: add NMBondManager to handle NTF rules for balance-slb (MLAG) 2022-10-04 12:37:41 +02:00
nm-bond-manager.h core: add NMBondManager to handle NTF rules for balance-slb (MLAG) 2022-10-04 12:37:41 +02:00
nm-checkpoint-manager.c core: use nm_dbus_manager_lookup_object_with_type() 2022-03-13 12:02:08 +01:00
nm-checkpoint-manager.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-checkpoint.c device: use NMUnmanFlagOp enum members instead of literals 2023-01-27 14:47:31 +01:00
nm-checkpoint.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-config-data.c dns-manager: always apply options from [global-dns] 2023-01-26 09:02:16 +01:00
nm-config-data.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-config.c config: fix a reversed conditional 2023-01-26 09:02:16 +01:00
nm-config.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-connectivity.c curl: use CURLOPT_PROTOCOLS_STR instead of deprecated CURLOPT_PROTOCOLS 2023-01-18 20:21:52 +01:00
nm-connectivity.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-core-utils.c core: check hardware address length in nm_utils_get_ipv6_interface_identifier() 2022-12-06 17:10:42 +01:00
nm-core-utils.h core: fix enum argument in prototype of nm_utils_kill_process_sync(), etc. 2023-01-18 19:38:54 +01:00
nm-dbus-manager.c all: fix various "-Wcast-align=strict" warnings 2022-12-09 09:15:56 +01:00
nm-dbus-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-dbus-object.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-dbus-object.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-dbus-utils.c all: fix various "-Wcast-align=strict" warnings 2022-12-09 09:15:56 +01:00
nm-dbus-utils.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-dcb.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-dcb.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-default-daemon.h libnm: move nm-errors.h include away from nm-connection.h 2022-11-13 23:36:37 +01:00
nm-dhcp-config.c all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-dhcp-config.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-dispatcher.c glib-aux: drop duplicate _nm_dbus_error_has_name() for nm_dbus_error_is() 2022-11-14 08:04:16 +01:00
nm-dispatcher.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-firewall-utils.c firewall: pass "--wait 2" to iptables to wait for concurrent invocations 2023-01-16 10:19:39 +01:00
nm-firewall-utils.h firewall: add mlag firewall utils for multi chassis link aggregation (MLAG) for bonding-slb 2022-10-04 12:37:41 +02:00
nm-firewalld-manager.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-firewalld-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-hostname-manager.c hostname: rename nm_hostname_manager_write_hostname() to set_static_hostname() 2022-10-27 15:18:54 +02:00
nm-hostname-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-ip-config.c core: extend NML3ConfigData:nameserver to track DNS as string 2022-10-27 09:11:33 +02:00
nm-ip-config.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-keep-alive.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-keep-alive.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-l3-config-data.c l3-config-data: do not check route table to get direct routes 2023-01-26 11:10:08 +01:00
nm-l3-config-data.h core: extend NML3ConfigData:nameserver to track DNS as string 2022-10-27 09:11:33 +02:00
nm-l3-ipv4ll.c glib-aux: rename IP address related helpers from "nm-inet-utils.h" 2022-08-25 19:05:51 +02:00
nm-l3-ipv4ll.h all: fix various "-Wcast-align=strict" warnings 2022-12-09 09:15:56 +01:00
nm-l3-ipv6ll.c all: add src/nm-compat-headers for patching included system headers 2022-09-23 11:43:33 +02:00
nm-l3-ipv6ll.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-l3cfg.c l3cfg: schedule an update after every commit-type/config-data register/unregister 2023-01-19 12:40:33 +01:00
nm-l3cfg.h nm-netns: track ECMP routes 2022-12-23 16:47:29 +01:00
nm-manager.c device: use NMUnmanFlagOp enum members instead of literals 2023-01-27 14:47:31 +01:00
nm-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-netns.c Revert "nm-netns: add onlink routes for ECMP routes" 2023-01-26 11:10:08 +01:00
nm-netns.h nm-netns: track ECMP routes 2022-12-23 16:47:29 +01:00
nm-pacrunner-manager.c glib-aux: rename IP address related helpers from "nm-inet-utils.h" 2022-08-25 19:05:51 +02:00
nm-pacrunner-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-policy.c Revert "policy: track the autoconnect retries in devices for multi-connect" 2022-12-20 16:12:43 +01:00
nm-policy.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-priv-helper-call.c nm-sudo: rename to nm-priv-helper 2022-01-11 21:46:55 +01:00
nm-priv-helper-call.h nm-sudo: rename to nm-priv-helper 2022-01-11 21:46:55 +01:00
nm-rfkill-manager.c core: export radio flags 2022-03-29 09:34:07 +02:00
nm-rfkill-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-session-monitor.c all: prefer nm wrappers to automatically attach GSource to default context 2022-03-13 11:59:42 +01:00
nm-session-monitor.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-sleep-monitor.c glib-aux: rename _nm_dbus_signal_connect{,_data}() to _nm_dbus_proxy_*() 2022-11-14 08:05:47 +01:00
nm-sleep-monitor.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-test-utils-core.h platform: drop inline cmp() wrappers around "full" versions 2022-11-21 17:56:48 +01:00
nm-types.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
org.freedesktop.NetworkManager.conf all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
README.l3cfg.md core: rework IP configuration in NetworkManager using layer 3 configuration 2021-11-18 16:21:29 +01:00
README.md all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00
README.next.ip-config.md core: rework IP configuration in NetworkManager using layer 3 configuration 2021-11-18 16:21:29 +01:00

core

The source code of the NetworkManager daemon.

NetworkManager is a daemon that provides a D-Bus API and a file-based API for configuring the network on a Linux host.

This is the daemon source code.