mirror of
https://github.com/coredns/coredns.git
synced 2026-08-28 07:37:04 -04:00
core/dnsserver: add opt-in opcode admission (#8469)
Keep miekg/dns's default request policy unless a plugin explicitly registers an additional opcode. Aggregate the policy at the listener, then enforce it again after zone routing so mixed server blocks on one socket remain isolated. Apply the same policy to UDP, TCP, and DNS-over-TLS while preserving TSIG verification and the one-question requirement. Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>
This commit is contained in:
@@ -135,6 +135,10 @@ type Config struct {
|
||||
// TSIG secrets, [name]key.
|
||||
TsigSecret map[string]string
|
||||
|
||||
// allowedOpcodes contains non-default DNS opcodes that plugins have explicitly
|
||||
// requested for this server block. QUERY and NOTIFY are accepted by default.
|
||||
allowedOpcodes map[int]struct{}
|
||||
|
||||
// Plugin stack.
|
||||
Plugin []plugin.Plugin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user