timesyncd: only attempt to connect when an address is configured
For now, we accept both link-local and routable addresses, maybe we want to restrict ourselves to routable addresses only.
This commit is contained in:
@@ -1070,7 +1070,7 @@ static bool network_is_online(void) {
|
||||
int r;
|
||||
|
||||
r = sd_network_get_operational_state(&state);
|
||||
if (r >= 0 && streq("carrier", state))
|
||||
if (r >= 0 && (streq("routable", state) || streq("degraded", state)))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user