From a04254b07e313459af1217f941ceac218b675211 Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Wed, 18 Nov 2020 00:10:36 +0100 Subject: [PATCH] only ignore SYN packet because it can be the start of a QUIC handshake too --- puncher.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/puncher.nim b/puncher.nim index d57e6ab..d78e68c 100644 --- a/puncher.nim +++ b/puncher.nim @@ -70,7 +70,9 @@ 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": + if msg == "SYN": + # We received a SYN packet. We ignore it because we expected it to be + # filtered by our NAT. return echo &"handling ACK message from {peerIp}:{peerPort}" let (_, myPort) = puncher.sock.getLocalAddr()