plugin/hosts: fall through unsupported query types (#8193)

This commit is contained in:
houyuwushang
2026-06-24 17:28:20 +08:00
committed by GitHub
parent fc447d0658
commit faeb8ba699
2 changed files with 33 additions and 0 deletions

View File

@@ -50,6 +50,10 @@ func (h Hosts) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (
case dns.TypeAAAA:
ips := h.LookupStaticHostV6(qname)
answers = aaaa(qname, h.options.ttl, ips)
default:
if h.Fall.Through(qname) {
return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r)
}
}
// Only on NXDOMAIN we will fallthrough.