Skip to content

Commit

Permalink
network: set *_configured = false when (re-)setting addresses or friends
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwata committed Dec 26, 2018
1 parent 6ed3bd4 commit f8ef5fb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/network/networkd-link.c
Expand Up @@ -794,6 +794,8 @@ static int link_set_routing_policy_rule(Link *link) {
assert(link);
assert(link->network);

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,
Expand Down Expand Up @@ -868,6 +870,8 @@ static int link_request_set_routes(Link *link) {

(void) link_set_routing_policy_rule(link);

link->static_routes_configured = false;

/* First add the routes that enable us to talk to gateways, then add in the others that need a gateway. */
for (phase = 0; phase < _PHASE_MAX; phase++)
LIST_FOREACH(routes, rt, link->network->static_routes) {
Expand Down Expand Up @@ -902,6 +906,8 @@ static int link_request_set_neighbors(Link *link) {
assert(link->network);
assert(link->state != _LINK_STATE_INVALID);

link->neighbors_configured = false;

LIST_FOREACH(neighbors, neighbor, link->network->neighbors) {
r = neighbor_configure(neighbor, link, NULL);
if (r < 0) {
Expand Down Expand Up @@ -1080,6 +1086,8 @@ static int link_request_set_addresses(Link *link) {
if (r < 0)
return r;

link->addresses_configured = false;

LIST_FOREACH(addresses, ad, link->network->static_addresses) {
r = address_configure(ad, link, address_handler, false);
if (r < 0) {
Expand Down

0 comments on commit f8ef5fb

Please sign in to comment.