diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/notify-dns-slaves.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/notify-dns-slaves.c b/tools/notify-dns-slaves.c index 63d1d9a..3a7f342 100644 --- a/tools/notify-dns-slaves.c +++ b/tools/notify-dns-slaves.c @@ -473,6 +473,7 @@ static int process_notify (const char *zone, const char *server, uint64_t delay) { notification *notif, **not; + struct addrinfo hints; char name[MAX_NAME * 2]; HEADER *hdr; size_t reqlen; @@ -568,9 +569,13 @@ process_notify (const char *zone, const char *server, uint64_t delay) /* Needs resolving */ if (rc == SANY_AF_DNS) { + memset (&hints, 0, sizeof (hints)); + hints.ai_family = PF_UNSPEC; + hints.ai_socktype = SOCK_DGRAM; + hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICSERV; SANY_TYPE (notif->address) = 0; debug ("resolving address: %s", notif->server); - async_resolver_queue (notif->server, "53", NULL, address_resolved, notif); + async_resolver_queue (notif->server, "53", &hints, address_resolved, notif); } else { notif->resolved = 1; prepare_and_process (notif, when); |