Commit d0adf6f3 authored by Miek Gieben's avatar Miek Gieben Committed by GitHub

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: default avatarMiek Gieben <miek@miek.nl>
parent fed307bf
...@@ -55,6 +55,7 @@ func Version(req *dns.Msg) (*dns.Msg, error) { ...@@ -55,6 +55,7 @@ func Version(req *dns.Msg) (*dns.Msg, error) {
o.Hdr.Name = "." o.Hdr.Name = "."
o.Hdr.Rrtype = dns.TypeOPT o.Hdr.Rrtype = dns.TypeOPT
o.SetVersion(0) o.SetVersion(0)
m.Rcode = dns.RcodeBadVers
o.SetExtendedRcode(dns.RcodeBadVers) o.SetExtendedRcode(dns.RcodeBadVers)
m.Extra = []dns.RR{o} m.Extra = []dns.RR{o}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment