networkd: check the existence of the route

This commit is contained in:
Yu Watanabe
2021-12-17 00:13:42 +09:00
parent a71c5c44f7
commit f974f17ae7
+4
View File
@@ -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;