fix return value of find*Attempt procs
This commit is contained in:
parent
84cb8611ef
commit
9e3b7fe987
|
@ -141,6 +141,7 @@ proc findConnectAttempt(puncher: TcpSyniPuncher, srcIp: IpAddress,
|
||||||
attempt.dstIp == dstIp and
|
attempt.dstIp == dstIp and
|
||||||
attempt.dstPorts.any(proc (p: Port): bool = p in dstPorts):
|
attempt.dstPorts.any(proc (p: Port): bool = p in dstPorts):
|
||||||
return index
|
return index
|
||||||
|
return -1
|
||||||
|
|
||||||
proc findAcceptAttempt(puncher: TcpSyniPuncher, srcIp: IpAddress,
|
proc findAcceptAttempt(puncher: TcpSyniPuncher, srcIp: IpAddress,
|
||||||
srcPort: Port, dstIp: IpAddress,
|
srcPort: Port, dstIp: IpAddress,
|
||||||
|
@ -150,6 +151,7 @@ proc findAcceptAttempt(puncher: TcpSyniPuncher, srcIp: IpAddress,
|
||||||
attempt.dstIp == dstIp and
|
attempt.dstIp == dstIp and
|
||||||
attempt.dstPorts.any(proc (p: Port): bool = p in dstPorts):
|
attempt.dstPorts.any(proc (p: Port): bool = p in dstPorts):
|
||||||
return index
|
return index
|
||||||
|
return -1
|
||||||
|
|
||||||
proc findAcceptAttemptsByLocalAddr(puncher: TcpSyniPuncher, address: IpAddress,
|
proc findAcceptAttemptsByLocalAddr(puncher: TcpSyniPuncher, address: IpAddress,
|
||||||
port: Port): seq[AcceptAttempt] =
|
port: Port): seq[AcceptAttempt] =
|
||||||
|
|
Loading…
Reference in New Issue