1
0
mirror of https://github.com/DNSCrypt/dnscrypt-proxy.git synced 2024-12-29 00:30:30 +01:00

cleanup: MinDNSPacketSize is checked next

This commit is contained in:
Markus Linnala 2019-10-15 19:37:24 +03:00 committed by Frank Denis
parent c699e7bec4
commit 13e9c15212

View File

@ -254,7 +254,7 @@ func (proxy *Proxy) tcpListener(acceptPc *net.TCPListener) {
defer proxy.clientsCountDec()
clientPc.SetDeadline(time.Now().Add(proxy.timeout))
packet, err := ReadPrefixed(&clientPc)
if err != nil || len(packet) < MinDNSPacketSize {
if err != nil {
return
}
clientAddr := clientPc.RemoteAddr()