Skip to content

Commit 05e4a73

Browse files
committed
Protect debug logging against null clientAddr from DNS64 trampoline queries
1 parent 89d17ba commit 05e4a73

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

dnscrypt-proxy/proxy.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,11 @@ func (proxy *Proxy) processIncomingQuery(
683683
onlyCached bool,
684684
) []byte {
685685
// Initialize metrics for this query
686-
dlog.Debugf("Processing incoming query from %s", (*clientAddr).String())
686+
clientAddrStr := "unknown"
687+
if clientAddr != nil {
688+
clientAddrStr = (*clientAddr).String()
689+
}
690+
dlog.Debugf("Processing incoming query from %s", clientAddrStr)
687691

688692
// Validate the query
689693
var response []byte

0 commit comments

Comments
 (0)