diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-10-02 10:08:39 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-10-07 02:44:42 +0900 |
commit | d9940a3f8a5a5d4e67e67ff5386c7962e3d4adaa (patch) | |
tree | dbebe92647f1ebaef4f734536e0840e35e500b8d /src/network/networkd-network.c | |
parent | 565194127a92fe80b6254b4ed9482c8473197586 (diff) | |
download | systemd-d9940a3f8a5a5d4e67e67ff5386c7962e3d4adaa.tar.gz |
network: introduce network_verify_routes()
Diffstat (limited to 'src/network/networkd-network.c')
-rw-r--r-- | src/network/networkd-network.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index b9b3ed24d2..db192cb475 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -156,7 +156,6 @@ static int network_resolve_stacked_netdevs(Network *network) { int network_verify(Network *network) { Address *address, *address_next; - Route *route, *route_next; TrafficControl *tc; SRIOV *sr_iov; @@ -219,6 +218,8 @@ int network_verify(Network *network) { address_free(address); } if (network->n_static_routes > 0) { + Route *route; + log_warning("%s: Cannot set routes when Bond= is specified, ignoring routes.", network->filename); while ((route = network->static_routes)) @@ -298,10 +299,7 @@ int network_verify(Network *network) { if (address_section_verify(address) < 0) address_free(address); - LIST_FOREACH_SAFE(routes, route, route_next, network->static_routes) - if (route_section_verify(route, network) < 0) - route_free(route); - + network_verify_routes(network); network_verify_nexthops(network); network_verify_fdb_entries(network); network_verify_mdb_entries(network); |