From ccb2774814e944dbfe0f444a9c6ecc18aea34b61 Mon Sep 17 00:00:00 2001 From: buffermet <29265684+buffermet@users.noreply.github.com> Date: Sat, 12 Oct 2024 21:50:26 +0200 Subject: [PATCH] Shrink code. --- modules/dns_proxy/dns_proxy_base_filters.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/dns_proxy/dns_proxy_base_filters.go b/modules/dns_proxy/dns_proxy_base_filters.go index 60cdd5dd..48af3675 100644 --- a/modules/dns_proxy/dns_proxy_base_filters.go +++ b/modules/dns_proxy/dns_proxy_base_filters.go @@ -29,16 +29,12 @@ func tabsToSpaces(s string) string { } func (p *DNSProxy) logRequestAction(m *dns.Msg, clientIP string) { - var questions []string - for _, q := range m.Question { - questions = append(questions, tabsToSpaces(q.String())) - } p.Sess.Events.Add(p.Name+".spoofed-request", struct { Client string Questions []string }{ clientIP, - questions, + questionsToStrings(m.Question), }) }