cleanup: MinDNSPacketSize is checked next
This commit is contained in:
parent
c699e7bec4
commit
13e9c15212
|
@ -254,7 +254,7 @@ func (proxy *Proxy) tcpListener(acceptPc *net.TCPListener) {
|
||||||
defer proxy.clientsCountDec()
|
defer proxy.clientsCountDec()
|
||||||
clientPc.SetDeadline(time.Now().Add(proxy.timeout))
|
clientPc.SetDeadline(time.Now().Add(proxy.timeout))
|
||||||
packet, err := ReadPrefixed(&clientPc)
|
packet, err := ReadPrefixed(&clientPc)
|
||||||
if err != nil || len(packet) < MinDNSPacketSize {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
clientAddr := clientPc.RemoteAddr()
|
clientAddr := clientPc.RemoteAddr()
|
||||||
|
|
Loading…
Reference in New Issue