Add option to DNS server to ignore them when they are not available via an interface network

This commit is contained in:
Daniel 2024-07-03 17:17:51 +02:00
parent 35ac64bd82
commit 42e725921b
4 changed files with 29 additions and 1 deletions

View file

@ -422,6 +422,12 @@ func resolveAndCache(ctx context.Context, q *Query, oldCache *RRCache) (rrCache
continue
}
// Skip unreachable link-local resolvers.
if resolver.LinkLocalUnavailable {
log.Tracer(ctx).Tracef("resolver: skipping resolver %s, because it is link-local and not available", resolver)
continue
}
// resolve
log.Tracer(ctx).Tracef("resolver: sending query for %s to %s", q.ID(), resolver.Info.ID())
rrCache, err = resolver.Conn.Query(ctx, q)