]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: do nothing if link is in pending or linger state on reconfiguring 14611/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 22 Jan 2020 07:06:50 +0000 (16:06 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 22 Jan 2020 07:08:12 +0000 (16:08 +0900)
src/network/networkd-link.c

index 85d0c92b96d2c2d5cef802cce3eddb3252d2d338..f3744e2354ce42b29d4f124fdb2244413e06327c 100644 (file)
@@ -3023,9 +3023,6 @@ static int link_reconfigure_internal(Link *link, sd_netlink_message *m, bool for
         Network *network;
         int r;
 
-        if (IN_SET(link->state, LINK_STATE_PENDING, LINK_STATE_LINGER))
-                return 0;
-
         if (m) {
                 _cleanup_strv_free_ char **s = NULL;
 
@@ -3128,6 +3125,9 @@ int link_reconfigure(Link *link, bool force) {
         _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
         int r;
 
+        if (IN_SET(link->state, LINK_STATE_PENDING, LINK_STATE_LINGER))
+                return 0;
+
         r = sd_rtnl_message_new_link(link->manager->rtnl, &req, RTM_GETLINK,
                                      link->ifindex);
         if (r < 0)