Put EDNS0 at the beginning of the OPT section

This commit is contained in:
Star Brilliant committed 2018-04-25 03:05:06 +08:00
1 parent 874a3613e4
commit 5afdee6315
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -95,7 +95,7 @@ func (s *Server) parseRequestIETF(w http.ResponseWriter, r *http.Request) *DNSRe
opt.Hdr.Rrtype = dns.TypeOPT
opt.SetUDPSize(dns.DefaultMsgSize)
opt.SetDo(false)
msg.Extra = append(msg.Extra, opt)
msg.Extra = append([]dns.RR{opt}, msg.Extra...)
}
var edns0Subnet *dns.EDNS0_SUBNET
for _, option := range opt.Option {