Skip to content

Commit fc783ec

Browse files
authored
Merge pull request #1079 from vmasutin/udp-truncate-fix
Fixing TruncateReply option passing
2 parents b4cb081 + b158a13 commit fc783ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/hostagent/dns/dns.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ func NewHandler(opts HandlerOptions) (dns.Handler, error) {
124124
{Net: "tcp"},
125125
}
126126
h := &Handler{
127+
truncate: opts.TruncateReply,
127128
clientConfig: cc,
128129
clients: clients,
129130
ipv6: opts.IPv6,
@@ -368,7 +369,7 @@ func listenAndServe(network Network, opts ServerOptions) (*dns.Server, error) {
368369
var addr string
369370
// always enable reply truncate for UDP
370371
if network == UDP {
371-
opts.TruncateReply = true
372+
opts.HandlerOptions.TruncateReply = true
372373
addr = fmt.Sprintf("%s:%d", opts.Address, opts.UDPPort)
373374
} else {
374375
addr = fmt.Sprintf("%s:%d", opts.Address, opts.TCPPort)

0 commit comments

Comments
 (0)