From: Rafał Miłecki Date: Tue, 14 Feb 2017 12:55:46 +0000 (+0100) Subject: Use A(AAA) when querying for domain on cache expire X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=267686c21f4b31346839ae1d4085d4990fcdc63c;p=oweals%2Fmdnsd.git Use A(AAA) when querying for domain on cache expire When cache entry is (halfly) expired we send query to get an update. So far we were sending all queries using PTR records but for cached domains it should be A(AAA) instead. Signed-off-by: Rafał Miłecki Acked-by: John Crispin --- diff --git a/cache.c b/cache.c index dd263d2..756ae68 100644 --- a/cache.c +++ b/cache.c @@ -89,7 +89,12 @@ cache_gc_timer(struct uloop_timeout *timeout) continue; } s->refresh += 50; - dns_send_question(s->iface, s->entry, TYPE_PTR, 0); + if (cache_service_is_host(s)) { + dns_send_question(s->iface, s->entry, TYPE_A, 0); + dns_send_question(s->iface, s->entry, TYPE_AAAA, 0); + } else { + dns_send_question(s->iface, s->entry, TYPE_PTR, 0); + } } uloop_timeout_set(timeout, 10000);