[systemd-commits] 3 commits - TODO src/timesync
Lennart Poettering
lennart at kemper.freedesktop.org
Tue May 6 03:34:43 PDT 2014
TODO | 6 ++++++
src/timesync/timesyncd.c | 14 ++++++++++++--
2 files changed, 18 insertions(+), 2 deletions(-)
New commits:
commit 600809211ecf1b1c3f2b701f30e5f77e33f0348b
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue May 6 12:34:03 2014 +0200
timesyncd: keep order of NTP servers
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
index 1237abb..1c0f113 100644
--- a/src/timesync/timesyncd.c
+++ b/src/timesync/timesyncd.c
@@ -935,7 +935,7 @@ static int manager_connect(Manager *m) {
}
static int manager_add_server(Manager *m, const char *server) {
- ServerName *n;
+ ServerName *n, *tail;
assert(m);
assert(server);
@@ -950,7 +950,12 @@ static int manager_add_server(Manager *m, const char *server) {
return -ENOMEM;
}
- LIST_PREPEND(names, m->servers, n);
+ if (m->servers) {
+ LIST_FIND_TAIL(names, m->servers, tail);
+ LIST_INSERT_AFTER(names, m->servers, tail, n);
+ } else
+ LIST_PREPEND(names, m->servers, n);
+
return 0;
}
commit 1df52dd282cd6014ace8ca2279dd90d9ea52d2a4
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue May 6 12:33:53 2014 +0200
update TODO
diff --git a/TODO b/TODO
index 2e3d017..89006a5 100644
--- a/TODO
+++ b/TODO
@@ -32,6 +32,12 @@ External:
Features:
+* timesyncd:
+ - config file
+ - reconnect on reply timeout
+ - hookup with networkd: dhcp, listen to online/offline state
+ - res_init()
+
* a way for container managers to turn off getty starting via $container_headless= or so...
* figure out a nice way how we can let the admin know what child/sibling unit causes cgroup membership for a specific unit
commit 05f7fc0fe3b65cb203bf1e32002db07d860767b5
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue May 6 12:33:43 2014 +0200
timesyncd: make sure to reread /etc/resolv.conf when we try the next NTP server
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
index 33afbce..1237abb 100644
--- a/src/timesync/timesyncd.c
+++ b/src/timesync/timesyncd.c
@@ -32,6 +32,7 @@
#include <sys/timerfd.h>
#include <sys/timex.h>
#include <sys/socket.h>
+#include <resolv.h>
#include "missing.h"
#include "util.h"
@@ -913,6 +914,10 @@ static int manager_connect(Manager *m) {
m->current_server_name = m->servers;
}
+ /* Tell the resolver to reread /etc/resolv.conf, in
+ * case it changed. */
+ res_init();
+
r = sd_resolve_getaddrinfo(m->resolve, &m->resolve_query, m->current_server_name->string, "123", &hints, manager_resolve_handler, m);
if (r < 0) {
log_error("Failed to create resolver: %s", strerror(-r));
More information about the systemd-commits
mailing list