NetworkManager/src/core
Thomas Haller 07bdf58856
core/l3cfg: let NML3Cfg handle nodev (blackhole) routes
Certain route types (blackhole, unreachable, prohibit) are not tied to
an interface. They are thus global and we need to track them system wide
(or better: per network namespace). That is done by NMPRouteManager.

For the routing rules, it's NMDevice itself to track/untrack the rules.
That is done for historical reasons, at the time, NML3Cfg did not exit.
Now with NML3Cfg, it seems that also NML3Cfg should be the part that
handles nodev routes. One reason is that we want to move IP
functionality out of NMDevice. So callers (NMDevice) would just add
blackhole routes to the NML3ConfigData and let NML3Cfg handle them.

Still, to handle these routes is rather different from regular routes.
Normally, NML3Cfg tracks an object state (ObjStateData) for each address/route,
and it hooks into platform signals to update the os_plobj field. Those signals
are dispatched by NMNetns and are only per-ifindex. Hence, NML3Cfg
wouldn't be notified about those nodev routes. Consequently, there
os_plobj could not be (efficiently) maintained and there is no
ObjStateData for such routes.

Instead, all that NML3Cfg does is have the routes in the NML3ConfigData and
tell NMPRouteManager about them. Seems simple enough. The only question
is when should NMPRouteManager sync? For now, we sync when the
track/untracking brings any changes and during reapply. Which is
probably fine.

(cherry picked from commit 9ab53e561a)
2022-02-10 08:41:19 +01:00
..
devices platform: improve way to prune dirty route-manager entries 2022-02-10 08:41:18 +01:00
dhcp dhcp-options: change "dhcp6_ntp_server" to plural form 2022-02-04 15:54:15 +01:00
dns dns: better track l3cd changes 2022-01-26 14:54:52 +01:00
dnsmasq format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
ndisc format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
platform platform: extend NMPRouteManager to work for routes 2022-02-10 08:41:18 +01:00
ppp format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
settings keyfile: for keyfile owner check allow root and euid 2022-01-18 18:10:56 +01:00
supplicant supplicant: use nm_ref_string_reset_str() in _properties_changed_main() 2022-01-27 19:04:44 +01:00
tests format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
vpn core: increase l3cfg merge priority for VPN config 2022-02-01 19:22:02 +01:00
main-utils.c core: move nm_main_utils_get_nm_[ug]id() to "nm-core-utils.h" 2022-01-18 18:10:55 +01: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 Remove check for running as root, but keep translations 2022-01-18 17:30:45 +01:00
meson.build nm-sudo: rename to nm-priv-helper 2022-01-11 21:46:55 +01:00
NetworkManagerUtils.c core: handle blackhole/unreachable/prohibit route types in core 2022-02-10 08:41:19 +01:00
NetworkManagerUtils.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-active-connection.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-active-connection.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-audit-manager.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-audit-manager.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-auth-manager.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-auth-manager.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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-checkpoint-manager.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-checkpoint.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-config-data.c build: allow configuring default for wifi.backend setting 2022-01-04 06:41:37 +01:00
nm-config-data.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-config.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-config.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-connectivity.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-connectivity.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-core-utils.c core: make nm_utils_get_nm_[ug]id() thread safe 2022-01-18 18:21:02 +01:00
nm-core-utils.h core: move nm_main_utils_get_nm_[ug]id() to "nm-core-utils.h" 2022-01-18 18:10:55 +01:00
nm-dbus-manager.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-dbus-manager.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-dbus-utils.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 build: move "shared/nm-{glib-aux,log-null,log-core}" to "src/libnm-{glib-aux,log-null,log-core}" 2021-02-24 12:48:20 +01:00
nm-dhcp-config.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-dhcp-config.h core: rework IP configuration in NetworkManager using layer 3 configuration 2021-11-18 16:21:29 +01:00
nm-dispatcher.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-firewall-utils.h firewall: add special firewall-backend "none" 2021-05-14 11:41:33 +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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-hostname-manager.c core: ensure static-hostname is valid UTF-8 2022-01-10 20:43:17 +01:00
nm-hostname-manager.h core: rename related things explicitly to "static-hostname" 2022-01-10 20:43:17 +01:00
nm-ip-config.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-ip-config.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-l3-config-data.c core: handle blackhole/unreachable/prohibit route types in core 2022-02-10 08:41:19 +01:00
nm-l3-config-data.h core: support compare flags in nm_l3_config_data_cmp_full() 2022-01-26 14:54:51 +01:00
nm-l3-ipv4ll.c ipv4ll: fix assert on external LL address removal 2022-01-12 14:58:29 +01:00
nm-l3-ipv4ll.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-l3-ipv6ll.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 core/l3cfg: let NML3Cfg handle nodev (blackhole) routes 2022-02-10 08:41:19 +01:00
nm-l3cfg.h core/l3cfg: let NML3Cfg handle nodev (blackhole) routes 2022-02-10 08:41:19 +01:00
nm-manager.c device: fix assuming connections when platform-init arrives late 2022-02-03 09:17:20 +01:00
nm-manager.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-netns.c platform: rename "nmp-route-manager.h" to "nmp-rules-manager.h" 2022-02-10 08:41:17 +01:00
nm-netns.h platform: rename NMPRulesManager API to NMPRouteManager 2022-02-10 08:41:17 +01:00
nm-pacrunner-manager.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-pacrunner-manager.h core: rework IP configuration in NetworkManager using layer 3 configuration 2021-11-18 16:21:29 +01:00
nm-policy.c core: update hostname once at startup 2022-01-26 14:54:52 +01:00
nm-policy.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-rfkill-manager.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-session-monitor.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-session-monitor.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-sleep-monitor.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-sleep-monitor.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-test-utils-core.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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.