Skip to content

Instantly share code, notes, and snippets.

@chantra
Created May 16, 2018 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chantra/ed2050f58a1aa5efee94527abb61daa6 to your computer and use it in GitHub Desktop.
Save chantra/ed2050f58a1aa5efee94527abb61daa6 to your computer and use it in GitHub Desktop.
diff --git a/plugin/pkg/edns/edns.go b/plugin/pkg/edns/edns.go
index 3f0ea5e1..c058a411 100644
--- a/plugin/pkg/edns/edns.go
+++ b/plugin/pkg/edns/edns.go
@@ -28,8 +28,8 @@ func Version(req *dns.Msg) (*dns.Msg, error) {
o.Hdr.Name = "."
o.Hdr.Rrtype = dns.TypeOPT
o.SetVersion(0)
- o.SetExtendedRcode(dns.RcodeBadVers)
m.Extra = []dns.RR{o}
+ m.Rcode = dns.RcodeBadVers
return m, errors.New("EDNS0 BADVERS")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment