From 24d7fd82b2d8d0629be3d2fc13733ad74526d778 Mon Sep 17 00:00:00 2001 From: David Fifield Date: Wed, 29 Apr 2020 12:55:16 -0600 Subject: [PATCH] Log "too short for ClientID" on when it's a non-error response. The server would log "NXDOMAIN: 0 bytes are too short to contain a ClientID" even in the common cases where it got an A or NS query from the resolver (possibly from QNAME minimization). --- dnstt-server/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnstt-server/main.go b/dnstt-server/main.go index b3f0477..1414ef6 100644 --- a/dnstt-server/main.go +++ b/dnstt-server/main.go @@ -510,8 +510,8 @@ func recvLoop(domain dns.Name, dnsConn net.PacketConn, ttConn *turbotunnel.Queue // Payload is not long enough to contain a ClientID. if resp != nil && resp.Rcode() == dns.RcodeNoError { resp.Flags |= dns.RcodeNameError + log.Printf("NXDOMAIN: %d bytes are too short to contain a ClientID", n) } - log.Printf("NXDOMAIN: %d bytes are too short to contain a ClientID", n) } // If a response is called for, pass it to sendLoop via the channel. if resp != nil {