diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-12-12 02:48:03 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-12-17 00:13:42 +0900 |
commit | f974f17ae7efe249d84de79d71fc4b7a45f19280 (patch) | |
tree | f8874de2e9424cda394d3dfc3bcd63d5ee1eda50 | |
parent | a71c5c44f73553e1af6c10645fa3b5ca0a12f87a (diff) | |
download | systemd-f974f17ae7efe249d84de79d71fc4b7a45f19280.tar.gz |
networkd: check the existence of the route
-rw-r--r-- | src/network/networkd-address.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 603882bd45..7df743efb5 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; |