From: Yu Watanabe Date: Thu, 14 Jul 2022 21:04:51 +0000 (+0900) Subject: network: do not silently stop to process configuration on activation failure X-Git-Tag: v252-rc1~593^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b05e52000b4eee764b383cc3031da0a3739e996e;p=thirdparty%2Fsystemd.git network: do not silently stop to process configuration on activation failure Previously, if activation failed, link did not enter the failed state, but still Link.activated flag not set. Hence, nothing processed even if the interface is manually brought up later. Partially fixes #23649. --- diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c index 148277685e0..97c68487172 100644 --- a/src/network/networkd-setlink.c +++ b/src/network/networkd-setlink.c @@ -951,17 +951,10 @@ static int link_up_or_down_handler(sd_netlink *rtnl, sd_netlink_message *m, Requ r = sd_netlink_message_get_errno(m); if (r == -ENETDOWN && up && link_up_dsa_slave(link) > 0) log_link_message_debug_errno(link, m, r, "Could not bring up dsa slave, retrying again after dsa master becomes up"); - else if (r < 0) { - const char *error_msg; - - error_msg = up ? - (on_activate ? "Could not bring up interface" : "Could not bring up interface, ignoring") : - (on_activate ? "Could not bring down interface" : "Could not bring down interface, ignoring"); - - log_link_message_warning_errno(link, m, r, error_msg); - if (on_activate) - return 0; - } + else if (r < 0) + log_link_message_warning_errno(link, m, r, up ? + "Could not bring up interface, ignoring" : + "Could not bring down interface, ignoring"); r = link_call_getlink(link, get_link_update_flag_handler); if (r < 0) {