firewall rules not needed for tcp-syni's respond
This commit is contained in:
parent
0750af1a13
commit
a986bd52b8
|
@ -128,7 +128,7 @@ method cleanup*(attempt: TcpSyniInitiateAttempt) {.async.} =
|
||||||
await deleteFirewallRules(attempt)
|
await deleteFirewallRules(attempt)
|
||||||
|
|
||||||
method cleanup*(attempt: TcpSyniRespondAttempt) {.async.} =
|
method cleanup*(attempt: TcpSyniRespondAttempt) {.async.} =
|
||||||
await deleteFirewallRules(attempt)
|
discard
|
||||||
|
|
||||||
method getProtocol*(puncher: TcpSyniPuncher): Protocol =
|
method getProtocol*(puncher: TcpSyniPuncher): Protocol =
|
||||||
IPPROTO_TCP
|
IPPROTO_TCP
|
||||||
|
@ -178,10 +178,8 @@ method respond*(puncher: TcpSyniPuncher, attempt: Attempt):
|
||||||
assert(attempt.acceptFuture.isSome(), "expected attempt with acceptFuture")
|
assert(attempt.acceptFuture.isSome(), "expected attempt with acceptFuture")
|
||||||
try:
|
try:
|
||||||
let acceptFuture = attempt.acceptFuture.get()
|
let acceptFuture = attempt.acceptFuture.get()
|
||||||
await addFirewallRules(attempt) # FIXME: needed?
|
|
||||||
await injectSynPackets(TcpSyniRespondAttempt(attempt))
|
await injectSynPackets(TcpSyniRespondAttempt(attempt))
|
||||||
await acceptFuture or sleepAsync(Timeout)
|
await acceptFuture or sleepAsync(Timeout)
|
||||||
await deleteFirewallRules(attempt) # FIXME: needed?
|
|
||||||
if acceptFuture.finished():
|
if acceptFuture.finished():
|
||||||
result = acceptFuture.read()
|
result = acceptFuture.read()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue