network: do not make the implied default have the first priority

Follow-up for b732606950 and
6706ce2fd2.

If Network.ignore_carrier_loss_set flag is set, then the timeout value
is always used, hence the logic implemented by
b732606950 never worked.
This commit is contained in:
Yu Watanabe 2024-01-05 01:10:56 +09:00
parent 9c02eb283a
commit 2743854540
2 changed files with 2 additions and 4 deletions

View file

@ -1665,7 +1665,7 @@ static int link_carrier_lost(Link *link) {
usec = 5 * USEC_PER_SEC;
else
/* Otherwise, use the currently set value. */
/* Otherwise, use the implied default value. */
usec = link->network->ignore_carrier_loss_usec;
if (usec == USEC_INFINITY)

View file

@ -274,10 +274,8 @@ int network_verify(Network *network) {
network->ignore_carrier_loss_usec = USEC_INFINITY;
}
if (!network->ignore_carrier_loss_set) {
network->ignore_carrier_loss_set = true;
if (!network->ignore_carrier_loss_set) /* Set implied default. */
network->ignore_carrier_loss_usec = network->configure_without_carrier ? USEC_INFINITY : 0;
}
if (IN_SET(network->activation_policy, ACTIVATION_POLICY_DOWN, ACTIVATION_POLICY_ALWAYS_DOWN, ACTIVATION_POLICY_MANUAL)) {
if (network->required_for_online < 0 ||