NetworkManager/src/libnm-platform
Íñigo Huguet e330eb9c4a l3cfg: remove routes added by NM on reapply
By default, on reapply we were only syncing the main routes table. This
causes that routes added by NM to other tables are not removed on
reapply. This was done to preserve routes added externally, but routes
added by NM itself should be removed.

Add a new route table syncing mode "main + NM routes". This mode
maintains the normal behaviour of syncing completely the main table,
and for other tables removes only routes that were added by us, leaving
the rest untouched. Use this mode by default, as this is what a user
would expect on reapply.

Note: this might not work if NM is restarted between the profile being
modified and the reapply, because NM forgets what routes were added by
itself because of the restart. This is a rare corner case, though.

Use the D-Bus property "VersionInfo" to expose a capability flag
indicating that this bug is fixed. It is the first capability that we
expose in this way. However, it is convenient to do it this way as it's
something that clients like nmstate needs to know, so they can decide
whether a conn down is needed or not. It is not enough to decide that by
version number because it might be fixed via a downstream patch in distros
like RHEL.

https://issues.redhat.com/browse/RHEL-67324
https://issues.redhat.com/browse/RHEL-66262

Fixes: e9c17fcc9b ('l3cfg: default to 'main' route table sync mode')
2024-12-11 15:52:09 +00:00
..
devlink sriov: allow reading empty eswitch paramaters via Devlink 2024-02-21 11:27:36 +01:00
tests format: run nm-code-format 2024-10-04 11:07:35 +02:00
wifi format: run nm-code-format 2024-10-04 11:07:35 +02:00
wpan all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
meson.build platform: netlink: add devlink support 2024-02-21 11:27:28 +01:00
nm-linux-platform.c platform: support specifying the fwmark in ip_route_get() 2024-10-23 15:06:59 +02:00
nm-linux-platform.h platform: allow setting multi_idx instance for NMPlatform 2023-01-19 08:56:21 +01:00
nm-netlink.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-netlink.h format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-platform-private.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-platform-utils.c ethtool: support Forward Error Correction(fec) 2024-11-07 17:38:04 +08:00
nm-platform-utils.h ethtool: support Forward Error Correction(fec) 2024-11-07 17:38:04 +08:00
nm-platform.c l3cfg: remove routes added by NM on reapply 2024-12-11 15:52:09 +00:00
nm-platform.h l3cfg: remove routes added by NM on reapply 2024-12-11 15:52:09 +00:00
nmp-base.c src: drop most slave references from the code 2024-08-09 15:47:32 +02:00
nmp-base.h l3cfg: remove routes added by NM on reapply 2024-12-11 15:52:09 +00:00
nmp-global-tracker.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nmp-global-tracker.h platform: introduce function to globally track local route rule 2023-02-21 15:36:38 +01:00
nmp-netns.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nmp-netns.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nmp-object.c ipvlan: add support to IPVLAN interface 2024-09-18 13:19:42 +02:00
nmp-object.h ipvlan: add support to IPVLAN interface 2024-09-18 13:19:42 +02:00
nmp-plobj.c all: use NM_MIN() instead of MIN() 2023-11-15 09:32:20 +01:00
nmp-plobj.h format: run nm-code-format 2024-10-04 11:07:35 +02:00
README.md platform: support IPv6 mulitpath routes and fix cache inconsistency 2022-02-16 09:59:49 +01:00

libnm-platform

A static helper library that provides NMPlatform and other utils. This is NetworkManager's internal netlink library, but also contains helpers for sysfs, ethtool and other kernel APIs.

NMPlaform is also a cache of objects of the netlink API: NMPCache and NMPObject. These objects are used throughout NetworkManager also for generally tracking information about these types. For example, NMPlatformIP4Address (the public part of a certain type of NMPObject) is not only used to track platform addresses from netlink in the cache, but to track information about IPv4 addresses in general.

This depends on the following helper libraries