mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-03-30 16:25:39 +00:00
Put EDNS0 at the beginning of the OPT section
This commit is contained in:
@@ -75,7 +75,7 @@ func (c *Client) generateRequestIETF(w dns.ResponseWriter, r *dns.Msg, isTCP boo
|
||||
opt.Hdr.Rrtype = dns.TypeOPT
|
||||
opt.SetUDPSize(dns.DefaultMsgSize)
|
||||
opt.SetDo(false)
|
||||
r.Extra = append(r.Extra, opt)
|
||||
r.Extra = append([]dns.RR{opt}, r.Extra...)
|
||||
} else {
|
||||
udpSize = opt.UDPSize()
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user