network: make link_check_ready() return earlier if the link is not in 'configuring' state

This commit is contained in:
Yu Watanabe 2020-07-22 06:07:42 +09:00
parent 3336e946da
commit 5f58af25e6
1 changed files with 6 additions and 4 deletions

View File

@ -1086,8 +1086,11 @@ void link_check_ready(Link *link) {
assert(link);
if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER)) {
log_link_debug(link, "%s(): link is in failed or linger state.", __func__);
if (link->state == LINK_STATE_CONFIGURED)
return;
if (link->state != LINK_STATE_CONFIGURING) {
log_link_debug(link, "%s(): link is in %s state.", __func__, link_state_to_string(link->state));
return;
}
@ -1189,8 +1192,7 @@ void link_check_ready(Link *link) {
}
}
if (link->state != LINK_STATE_CONFIGURED)
link_enter_configured(link);
link_enter_configured(link);
return;
}