From 72681725b14aa1a4574a4ccbab40482030f2defa Mon Sep 17 00:00:00 2001 From: Markus Linnala Date: Wed, 16 Oct 2019 12:47:43 +0300 Subject: [PATCH] clanup: xtransport: use MaxDNSPacketSize more --- dnscrypt-proxy/xtransport.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dnscrypt-proxy/xtransport.go b/dnscrypt-proxy/xtransport.go index 54749db0..7811ce68 100644 --- a/dnscrypt-proxy/xtransport.go +++ b/dnscrypt-proxy/xtransport.go @@ -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 {