From d0f17cfda6e6df7748de1e49721ab4c0a064bf27 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 18 Dec 2021 09:46:55 +0900 Subject: [PATCH] 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. --- src/network/networkd-route.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 156476066a3..d7fb9094faf 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -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; -- 2.47.3