doh-client/google.go: [JSON-DOH] Honor DNSSEC OK flag for incoming DNS requests

This commit is contained in:
leixiang
2020-04-19 10:57:03 +08:00
parent 5f1f418664
commit f43d2c69e0

View File

@@ -67,6 +67,9 @@ func (c *Client) generateRequestGoogle(ctx context.Context, w dns.ResponseWriter
udpSize := uint16(512)
if opt := r.IsEdns0(); opt != nil {
udpSize = opt.UDPSize()
if opt.Do() {
requestURL += "&do=1"
}
}
ednsClientAddress, ednsClientNetmask := c.findClientIP(w, r)