1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-26 14:04:03 +03:00

network: route: do not drop unreachable route on reconfiguring downstream interface

Previously, when a downstream is reconfigured, the unreachable route
was removed as there is no corresponding static config in .network
files.
This commit is contained in:
Yu Watanabe 2021-12-18 09:46:55 +09:00
parent 277521a1ac
commit d0f17cfda6

View File

@ -792,6 +792,10 @@ static void manager_mark_routes(Manager *manager, bool foreign, const Link *exce
if (foreign && route->source != NETWORK_CONFIG_SOURCE_FOREIGN)
continue;
/* Do not touch dynamic routes. They will removed by dhcp_pd_prefix_lost() */
if (IN_SET(route->source, NETWORK_CONFIG_SOURCE_DHCP4, NETWORK_CONFIG_SOURCE_DHCP6))
continue;
/* Ignore routes not assigned yet or already removed. */
if (!route_exists(route))
continue;