X Tutup
Skip to content

Commit f974f17

Browse files
committed
networkd: check the existence of the route
1 parent a71c5c4 commit f974f17

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/network/networkd-address.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,10 @@ bool link_address_is_dynamic(const Link *link, const Address *address) {
728728
if (route->source != NETWORK_CONFIG_SOURCE_FOREIGN)
729729
continue;
730730

731+
/* The route is not assigned yet, or already removed. Ignoring. */
732+
if (!route_exists(route))
733+
continue;
734+
731735
if (route->protocol != RTPROT_DHCP)
732736
continue;
733737

0 commit comments

Comments
 (0)
X Tutup