]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: allow to (automatically) reconfigure failed interface
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Oct 2022 01:46:08 +0000 (10:46 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 27 Oct 2022 19:55:20 +0000 (04:55 +0900)
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.

src/network/networkd-link.c

index e901c62fbff9b065400a522dae212105513ad8cd..0759fbd9eb1a5626c1454d3e4a123fddbb277df5 100644 (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);