summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2014-05-06 12:29:20 +0200
committerKay Sievers <kay@vrfy.org>2014-05-06 12:29:20 +0200
commit136aa3b444ab5025ebb265b056c5c7ef55688774 (patch)
tree4088d824517b56a53c54dcf239076a9ee0bf138b /src
parent881c74201d42d84f076e11d4ed765bd8421a6ff0 (diff)
timesyncd: accept NTP version 3 responses
Diffstat (limited to 'src')
-rw-r--r--src/timesync/timesyncd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
index 4f4c3baa74..33afbce6b3 100644
--- a/src/timesync/timesyncd.c
+++ b/src/timesync/timesyncd.c
@@ -614,7 +614,7 @@ static int manager_receive_response(sd_event_source *source, int fd, uint32_t re
return manager_connect(m);
}
- if (NTP_FIELD_VERSION(ntpmsg.field) != 4) {
+ if (NTP_FIELD_VERSION(ntpmsg.field) != 4 && NTP_FIELD_VERSION(ntpmsg.field) != 3) {
log_debug("Response NTPv%d. Disconnecting.", NTP_FIELD_VERSION(ntpmsg.field));
return manager_connect(m);
}
@@ -1038,7 +1038,6 @@ int main(int argc, char *argv[]) {
sd_notify(false, "READY=1");
FOREACH_STRING(x, "time1.google.com", "time2.google.com", "time3.google.com", "time4.google.com", "0.fedora.pool.ntp.org") {
-
r = manager_add_server(m, x);
if (r < 0) {
log_error("Failed to add server %s: %s", x, strerror(-r));