From 9e3b7fe9871b8440f5403e7d8b41afb4b3f73d64 Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Fri, 2 Oct 2020 17:18:31 +0200 Subject: [PATCH] fix return value of find*Attempt procs --- tcp_syni.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tcp_syni.nim b/tcp_syni.nim index 90146e4..0060ca0 100644 --- a/tcp_syni.nim +++ b/tcp_syni.nim @@ -141,6 +141,7 @@ proc findConnectAttempt(puncher: TcpSyniPuncher, srcIp: IpAddress, attempt.dstIp == dstIp and attempt.dstPorts.any(proc (p: Port): bool = p in dstPorts): return index + return -1 proc findAcceptAttempt(puncher: TcpSyniPuncher, srcIp: IpAddress, srcPort: Port, dstIp: IpAddress, @@ -150,6 +151,7 @@ proc findAcceptAttempt(puncher: TcpSyniPuncher, srcIp: IpAddress, attempt.dstIp == dstIp and attempt.dstPorts.any(proc (p: Port): bool = p in dstPorts): return index + return -1 proc findAcceptAttemptsByLocalAddr(puncher: TcpSyniPuncher, address: IpAddress, port: Port): seq[AcceptAttempt] =