1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00

network: change order of dropping network configs

As routes may requires nexthops and addresses, nexthops may requires
addresses.
This commit is contained in:
Yu Watanabe 2021-05-07 16:35:42 +09:00
parent e80509a904
commit e36d601c5e

View File

@ -2028,20 +2028,20 @@ static int link_drop_foreign_config(Link *link) {
assert(link);
assert(link->manager);
r = link_drop_foreign_addresses(link);
k = link_drop_foreign_neighbors(link);
if (k < 0 && r >= 0)
r = k;
k = link_drop_foreign_routes(link);
if (k < 0 && r >= 0)
r = k;
r = link_drop_foreign_routes(link);
k = link_drop_foreign_nexthops(link);
if (k < 0 && r >= 0)
r = k;
k = link_drop_foreign_addresses(link);
if (k < 0 && r >= 0)
r = k;
k = link_drop_foreign_neighbors(link);
if (k < 0 && r >= 0)
r = k;
k = manager_drop_foreign_routing_policy_rules(link->manager);
if (k < 0 && r >= 0)
r = k;
@ -2055,20 +2055,20 @@ static int link_drop_config(Link *link) {
assert(link);
assert(link->manager);
r = link_drop_addresses(link);
k = link_drop_neighbors(link);
if (k < 0 && r >= 0)
r = k;
k = link_drop_routes(link);
if (k < 0 && r >= 0)
r = k;
r = link_drop_routes(link);
k = link_drop_nexthops(link);
if (k < 0 && r >= 0)
r = k;
k = link_drop_addresses(link);
if (k < 0 && r >= 0)
r = k;
k = link_drop_neighbors(link);
if (k < 0 && r >= 0)
r = k;
k = manager_drop_routing_policy_rules(link->manager, link);
if (k < 0 && r >= 0)
r = k;