need to include protocol here too

master
Christian Ulrich 2020-10-25 10:50:21 +01:00
parent 5bdb69f214
commit 4be3ffd207
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
1 changed files with 2 additions and 2 deletions

View File

@ -58,8 +58,8 @@ proc acceptConnections(punchd: Punchd, ip: IpAddress, port: Port,
let peer = acceptFuture.read()
let (peerAddr, peerPort) = peer.getPeerAddr()
let peerIp = parseIpAddress(peerAddr)
let query = Attempt(srcIp: ip, srcPort: port, dstIp: peerIp,
dstPorts: @[peerPort])
let query = Attempt(protocol: protocol, srcIp: ip, srcPort: port,
dstIp: peerIp, dstPorts: @[peerPort])
let i = punchd.attempts.find(query)
if i == -1:
echo "Accepted connection, but no attempt found. Discarding."