diff options
author | 2018-12-30 22:08:10 +0900 | |
---|---|---|
committer | 2019-01-03 11:59:29 -0500 | |
commit | 954bf58d345209508e83997a44f0a2d1e2c1f401 (patch) | |
tree | 313962013c6c8da50ea9fb0854a17f3a41690e48 | |
parent | network: rename link_set_routing_policy_rule() to link_request_set_routing_po... (diff) | |
download | systemd-954bf58d345209508e83997a44f0a2d1e2c1f401.tar.gz systemd-954bf58d345209508e83997a44f0a2d1e2c1f401.tar.bz2 systemd-954bf58d345209508e83997a44f0a2d1e2c1f401.zip |
network: set *_configured flags to false before requesting addresses or freinds
Fixes #11272.
(cherry picked from commit 2428613f854f46b6624199c2dc58d02617320133)
-rw-r--r-- | src/network/networkd-link.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index e52911117..5353b9daa 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -794,6 +794,9 @@ static int link_request_set_routing_policy_rule(Link *link) { assert(link); assert(link->network); + link_set_state(link, LINK_STATE_CONFIGURING); + link->routing_policy_rules_configured = false; + LIST_FOREACH(rules, rule, link->network->rules) { r = routing_policy_rule_get(link->manager, rule->family, &rule->from, rule->from_prefixlen, &rule->to, rule->to_prefixlen, rule->tos, rule->fwmark, rule->table, rule->iif, rule->oif, @@ -865,6 +868,7 @@ static int link_request_set_routes(Link *link) { assert(link->state != _LINK_STATE_INVALID); link_set_state(link, LINK_STATE_CONFIGURING); + link->static_routes_configured = false; r = link_request_set_routing_policy_rule(link); if (r < 0) @@ -905,6 +909,7 @@ static int link_request_set_neighbors(Link *link) { assert(link->state != _LINK_STATE_INVALID); link_set_state(link, LINK_STATE_CONFIGURING); + link->neighbors_configured = false; LIST_FOREACH(neighbors, neighbor, link->network->neighbors) { r = neighbor_configure(neighbor, link, NULL); @@ -1075,12 +1080,18 @@ static int link_request_set_addresses(Link *link) { assert(link->network); assert(link->state != _LINK_STATE_INVALID); + link_set_state(link, LINK_STATE_CONFIGURING); + + /* Reset all *_configured flags we are configuring. */ + link->addresses_configured = false; + link->neighbors_configured = false; + link->static_routes_configured = false; + link->routing_policy_rules_configured = false; + r = link_set_bridge_fdb(link); if (r < 0) return r; - link_set_state(link, LINK_STATE_CONFIGURING); - r = link_request_set_neighbors(link); if (r < 0) return r; |