mirror of
https://github.com/systemd/systemd
synced 2024-10-15 04:24:19 +00:00
timesync: stop re-sync on network configuration change when no link servers are configured (#26708)
This commit fixes an issue where systemd-timesyncd re-synchronizes the
system clock every time the network configuration is updated, no matter
whether link servers are actually changed.
Fixes a bug introduced by e05dd7718d
.
This commit is contained in:
parent
82c2095a5e
commit
0f9c8d0291
|
@ -973,10 +973,10 @@ static int manager_network_read_link_servers(Manager *m) {
|
||||||
assert(m);
|
assert(m);
|
||||||
|
|
||||||
r = sd_network_get_ntp(&ntp);
|
r = sd_network_get_ntp(&ntp);
|
||||||
if (r < 0) {
|
if (r < 0 && r != -ENODATA) {
|
||||||
if (r == -ENOMEM)
|
if (r == -ENOMEM)
|
||||||
log_oom();
|
log_oom();
|
||||||
else if (r != -ENODATA)
|
else
|
||||||
log_debug_errno(r, "Failed to get link NTP servers: %m");
|
log_debug_errno(r, "Failed to get link NTP servers: %m");
|
||||||
goto clear;
|
goto clear;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue