mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
edns0 compliance: set correct RCODE (#2388)
The miekg/dns API is a bit scruffy (documentation PR in flight soon), but these both need to be set for the correct RCODE to be reflected in the returned packet. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -55,6 +55,7 @@ func Version(req *dns.Msg) (*dns.Msg, error) {
|
||||
o.Hdr.Name = "."
|
||||
o.Hdr.Rrtype = dns.TypeOPT
|
||||
o.SetVersion(0)
|
||||
m.Rcode = dns.RcodeBadVers
|
||||
o.SetExtendedRcode(dns.RcodeBadVers)
|
||||
m.Extra = []dns.RR{o}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user