When the interface is in the failed state, link_getlink_handler_internal()
will do nothing and return zero, thus the interface will not be
reconfigured, especially when the reconfiguration is triggered in
link_enter_failed().
Follow-up for
c2eb7753dd47ec04ae0d66400e70bc87fbf1adcc.
if (r < 0)
return r;
if (r > 0) {
- link_set_state(l, LINK_STATE_INITIALIZED);
r = link_save_and_clean_full(l, /* also_save_manager = */ true);
if (r < 0)
return r;
if (r < 0)
return r;
+ if (force || link->state == LINK_STATE_FAILED)
+ link_set_state(link, LINK_STATE_INITIALIZED);
+
return 1; /* 1 means the interface will be reconfigured. */
}
TAKE_PTR(data);
link->manager->reloading++;
+ if (link->state == LINK_STATE_FAILED)
+ link_set_state(link, LINK_STATE_INITIALIZED);
+
return 0;
}