network: allow to (automatically) reconfigure failed interface

We have already allowed to reconfigure failed interface manually, but
not allowed to do automatically, e.g. on carrier gain.
This makes that failed interfaces also reconfigured automatically.

Note, the condition is inversed to shorten the condition.
This commit is contained in:
Yu Watanabe
2022-10-28 04:55:20 +09:00
parent 081466bd57
commit 4faca0a361
+1 -1
View File
@@ -1185,7 +1185,7 @@ static int link_reconfigure_impl(Link *link, bool force) {
assert(link);
if (!IN_SET(link->state, LINK_STATE_INITIALIZED, LINK_STATE_CONFIGURING, LINK_STATE_CONFIGURED, LINK_STATE_UNMANAGED))
if (IN_SET(link->state, LINK_STATE_PENDING, LINK_STATE_LINGER))
return 0;
r = netdev_get(link->manager, link->ifname, &netdev);