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>
Wed, 26 Jan 2022 13:41:47 +0000 (22:41 +0900)
commitcd7fcda54333dc95116a434cffc591f21edddbb2
treeea046fef878dcdf956fb80dbed473e7513bf955c
parent5f200833ed0754adaba548b0b617f6c192615acd
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.
src/network/wait-online/manager.c