plugin/hosts: make unsupported type fallthrough opt-in (#8282)

This commit is contained in:
houyuwushang
2026-07-20 10:59:12 +08:00
committed by GitHub
parent 201d86a098
commit 98bdb44f4d
6 changed files with 154 additions and 22 deletions

View File

@@ -73,6 +73,7 @@ hosts [FILE [ZONES...]] {
no_reverse
reload DURATION
fallthrough [ZONES...]
fallthrough_unsupported
}
~~~
@@ -93,6 +94,12 @@ hosts [FILE [ZONES...]] {
If **[ZONES...]** is omitted, then fallthrough happens for all zones for which the plugin
is authoritative. If specific zones are listed (for example `in-addr.arpa` and `ip6.arpa`), then only
queries for those zones will be subject to fallthrough.
By default, queries for unsupported record types return an authoritative NODATA response when
the queried name has an A or AAAA entry in the hosts data.
* `fallthrough_unsupported` extends `fallthrough` to unsupported query types when the queried name
exists in the hosts data. For example, TXT, HTTPS, and SVCB queries for a name with an A or AAAA
entry are passed to the next plugin. If that plugin is *forward*, these queries are sent upstream.
This option requires `fallthrough` and uses the same zone scope.
## Metrics