From 2c0d7ed393934078f8f05db3aef9abeb3a3c51e7 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 22 Jan 2020 16:06:50 +0900 Subject: [PATCH] network: do nothing if link is in pending or linger state on reconfiguring --- src/network/networkd-link.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 85d0c92b96..f3744e2354 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -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)