diff options
-rw-r--r-- | src/timesync/timesyncd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c index 33afbce6b3..1237abb542 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)); |