1
0
mirror of https://github.com/DNSCrypt/dnscrypt-proxy.git synced 2024-12-10 22:25:49 +01:00

In the query log, consider everything that's not UDP as TCP

Fixes #1589
This commit is contained in:
Frank Denis 2021-01-21 14:35:06 +01:00
parent 213695f651
commit ac0b9cdfe8

View File

@ -58,10 +58,8 @@ func (plugin *PluginQueryLog) Eval(pluginsState *PluginsState, msg *dns.Msg) err
var clientIPStr string
if pluginsState.clientProto == "udp" {
clientIPStr = (*pluginsState.clientAddr).(*net.UDPAddr).IP.String()
} else if pluginsState.clientProto == "tcp" {
clientIPStr = (*pluginsState.clientAddr).(*net.TCPAddr).IP.String()
} else {
clientIPStr = "-"
clientIPStr = (*pluginsState.clientAddr).(*net.TCPAddr).IP.String()
}
qName := pluginsState.qName