[client] Fall through dns chain for custom dns zones (#5081)

This commit is contained in:
Viktor Liu
2026-01-12 20:56:39 +08:00
committed by GitHub
parent 394ad19507
commit b12c084a50
12 changed files with 437 additions and 132 deletions

View File

@@ -325,6 +325,10 @@ func (d *DnsInterceptor) writeMsg(w dns.ResponseWriter, r *dns.Msg, logger *log.
return fmt.Errorf("received nil DNS message")
}
// Clear Zero bit from peer responses to prevent external sources from
// manipulating our internal fallthrough signaling mechanism
r.MsgHdr.Zero = false
if len(r.Answer) > 0 && len(r.Question) > 0 {
origPattern := ""
if writer, ok := w.(*nbdns.ResponseWriterChain); ok {