NetworkManager/src/libnm-platform
Thomas Haller 13d749942f
platform: don't add routes that are tracked as external routes
Due to something that really should be fixed, NetworkManager merges the routes
that it wants to configure, with the routes that are configured externally.
This includes a subtract and merge dance, which is wrong.

Anyway. If we are in nm_platform_ip_route_sync(), then we never want to
actively configure a route, that we only have in the list because it is
(or was) present on the interface.

Otherwise we have a problem. Note that we make a plan which
routes/addresses to add/remove before starting. So, if we start with an
IPv4 address configured in kernel, then there is also a corresponding
local route. We would track that local route as external.
During sync, we first remove the IP address, and kernel automatically
also removes the local route. However, as we already made the plan to
keep that route, NetworkManager would wrongly configure it again.

This should fix that bug. It is anyway wrong to even try to explicitly
configure a route, that is purely in the list as being external.

https://bugzilla.redhat.com/show_bug.cgi?id=1979192#c11
2021-07-21 09:54:58 +02:00
..
tests build/meson: cleanup tests 2021-02-28 18:56:08 +01:00
wifi clang-format: use "IndentPPDirectives:None" instead of "BeforeHash" 2021-07-09 08:49:06 +02:00
wpan platform: move "platform/{wifi,wpan}/" to "src/libnm-platform/" 2021-03-05 11:27:15 +01:00
meson.build platform: move more platform code to src/libnm-platform/ 2021-03-05 11:27:16 +01:00
nm-linux-platform.c platform: mark routes in NMPlatform cache as "external" 2021-07-21 09:54:58 +02:00
nm-linux-platform.h platform: move more platform code to src/libnm-platform/ 2021-03-05 11:27:16 +01:00
nm-netlink.c clang-format: use "IndentPPDirectives:None" instead of "BeforeHash" 2021-07-09 08:49:06 +02:00
nm-netlink.h clang-format: use "IndentPPDirectives:None" instead of "BeforeHash" 2021-07-09 08:49:06 +02:00
nm-platform-private.h platform: move more platform code to src/libnm-platform/ 2021-03-05 11:27:16 +01:00
nm-platform-utils.c clang-format: use "IndentPPDirectives:None" instead of "BeforeHash" 2021-07-09 08:49:06 +02:00
nm-platform-utils.h ethtool: Introducing PAUSE support 2021-05-12 18:04:46 +02:00
nm-platform.c platform: don't add routes that are tracked as external routes 2021-07-21 09:54:58 +02:00
nm-platform.h platform: add is-external flag to NMPlatformIPRoute 2021-07-21 09:54:58 +02:00
nmp-base.h ethtool: Introducing PAUSE support 2021-05-12 18:04:46 +02:00
nmp-netns.c platform: fix releasing thead-local stack of NMPNetns instances 2021-07-05 14:51:27 +02:00
nmp-netns.h build: move "shared/nm-platform" to "src/libnm-platform" 2021-02-24 12:48:17 +01:00
nmp-object.c trivial: fix coding style issue 2021-05-27 09:56:18 +02:00
nmp-object.h clang-format: reformat code with clang 12 2021-05-04 13:56:26 +02:00
nmp-rules-manager.c platform: move more platform code to src/libnm-platform/ 2021-03-05 11:27:16 +01:00
nmp-rules-manager.h platform: move more platform code to src/libnm-platform/ 2021-03-05 11:27:16 +01:00