mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-01-01 00:57:32 +01:00
clanup: xtransport: use MaxDNSPacketSize more
This commit is contained in:
parent
0d553a9fa7
commit
72681725b1
@ -158,7 +158,7 @@ func (xTransport *XTransport) resolveUsingResolver(dnsClient *dns.Client, host s
|
|||||||
if xTransport.useIPv4 {
|
if xTransport.useIPv4 {
|
||||||
msg := new(dns.Msg)
|
msg := new(dns.Msg)
|
||||||
msg.SetQuestion(dns.Fqdn(host), dns.TypeA)
|
msg.SetQuestion(dns.Fqdn(host), dns.TypeA)
|
||||||
msg.SetEdns0(4096, true)
|
msg.SetEdns0(uint16(MaxDNSPacketSize), true)
|
||||||
var in *dns.Msg
|
var in *dns.Msg
|
||||||
in, _, err = dnsClient.Exchange(msg, resolver)
|
in, _, err = dnsClient.Exchange(msg, resolver)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
@ -173,7 +173,7 @@ func (xTransport *XTransport) resolveUsingResolver(dnsClient *dns.Client, host s
|
|||||||
if xTransport.useIPv6 {
|
if xTransport.useIPv6 {
|
||||||
msg := new(dns.Msg)
|
msg := new(dns.Msg)
|
||||||
msg.SetQuestion(dns.Fqdn(host), dns.TypeAAAA)
|
msg.SetQuestion(dns.Fqdn(host), dns.TypeAAAA)
|
||||||
msg.SetEdns0(4096, true)
|
msg.SetEdns0(uint16(MaxDNSPacketSize), true)
|
||||||
var in *dns.Msg
|
var in *dns.Msg
|
||||||
in, _, err = dnsClient.Exchange(msg, resolver)
|
in, _, err = dnsClient.Exchange(msg, resolver)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user