1
0
mirror of https://github.com/DNSCrypt/dnscrypt-proxy.git synced 2024-12-29 00:30:30 +01:00

clanup: xtransport: use MaxDNSPacketSize more

This commit is contained in:
Markus Linnala 2019-10-16 12:47:43 +03:00 committed by Frank Denis
parent 0d553a9fa7
commit 72681725b1

View File

@ -158,7 +158,7 @@ func (xTransport *XTransport) resolveUsingResolver(dnsClient *dns.Client, host s
if xTransport.useIPv4 {
msg := new(dns.Msg)
msg.SetQuestion(dns.Fqdn(host), dns.TypeA)
msg.SetEdns0(4096, true)
msg.SetEdns0(uint16(MaxDNSPacketSize), true)
var in *dns.Msg
in, _, err = dnsClient.Exchange(msg, resolver)
if err == nil {
@ -173,7 +173,7 @@ func (xTransport *XTransport) resolveUsingResolver(dnsClient *dns.Client, host s
if xTransport.useIPv6 {
msg := new(dns.Msg)
msg.SetQuestion(dns.Fqdn(host), dns.TypeAAAA)
msg.SetEdns0(4096, true)
msg.SetEdns0(uint16(MaxDNSPacketSize), true)
var in *dns.Msg
in, _, err = dnsClient.Exchange(msg, resolver)
if err == nil {