From: Yu Watanabe Date: Sat, 11 Dec 2021 17:48:03 +0000 (+0900) Subject: networkd: check the existence of the route X-Git-Tag: v250-rc3~33^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f974f17ae7efe249d84de79d71fc4b7a45f19280;p=thirdparty%2Fsystemd.git networkd: check the existence of the route --- diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 603882bd454..7df743efb55 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -728,6 +728,10 @@ bool link_address_is_dynamic(const Link *link, const Address *address) { if (route->source != NETWORK_CONFIG_SOURCE_FOREIGN) continue; + /* The route is not assigned yet, or already removed. Ignoring. */ + if (!route_exists(route)) + continue; + if (route->protocol != RTPROT_DHCP) continue;