always use tcp for rfc2136

This commit is contained in:
Protryon 2023-08-01 15:01:00 -07:00
parent 952dc5d2e5
commit 8c75b5b18a

View File

@ -37,9 +37,6 @@ import (
) )
const ( const (
// maximum size of a UDP transport message in DNS protocol
udpMaxMsgSize = 512
// maximum time DNS client can be off from server for an update to succeed // maximum time DNS client can be off from server for an update to succeed
clockSkew = 300 clockSkew = 300
) )
@ -408,9 +405,7 @@ func (r rfc2136Provider) SendMessage(msg *dns.Msg) error {
} }
} }
if msg.Len() > udpMaxMsgSize { c.Net = "tcp"
c.Net = "tcp"
}
resp, _, err := c.Exchange(msg, r.nameserver) resp, _, err := c.Exchange(msg, r.nameserver)
if err != nil { if err != nil {