only handle ACK messages, not SYN (we expect them to be filtered by our NAT)

This commit is contained in:
Christian Ulrich 2020-11-17 23:44:13 +01:00
parent 06d7d29dc0
commit dc7c94ed0d
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
1 changed files with 2 additions and 0 deletions

View File

@ -70,6 +70,8 @@ proc handleMsg*(puncher: Puncher, msg: string, peerIp: IpAddress,
peerPort: Port) =
## Handles an incoming UDP message which may complete the Futures returned by
## ``initiate`` and ``respond``.
if msg != "ACK":
return
let (_, myPort) = puncher.sock.getLocalAddr()
let query = Attempt(srcPort: myPort, dstIp: peerIp, dstPorts: @[peerPort])
let i = puncher.attempts.find(query)