wait-online: make manager_link_is_online() return 0 when in unmanaged state
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Jan 2022 07:48:08 +0000 (16:48 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 11 Mar 2022 07:33:33 +0000 (16:33 +0900)
commit056fcd4e318aa664bd36950bf6c2dae4647c96c7
treef0ae48a12b53ae99a6bc6254cbf52c981d46412c
parent397ede8dcd29f35350c015f1d945e50c88476a93
wait-online: make manager_link_is_online() return 0 when in unmanaged state

Previously, even if a link is in unmanaged state, the function may
returns positive value. So, even if all managed links are in the configured
sate but do not satisfy the online criteria, e.g., IPv4 address state,
then wait-online finishes with positive value.

This makes the function always return 0 for unmanaged state. So, at
least one managed link must satisfies the online criteria.

This also adds more comments and debugging logs.

Fixes #22246.

(cherry picked from commit cd7fcda54333dc95116a434cffc591f21edddbb2)
src/network/wait-online/manager.c