From 60dee2705b3a9a8b1c3302b94b098c2d07b41a85 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 21 Jul 2021 17:48:33 +0200 Subject: tcp: Don't open a new connection from tap if both SYN and ACK are set Signed-off-by: Stefano Brivio --- tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcp.c b/tcp.c index d015b48..ffcbeca 100644 --- a/tcp.c +++ b/tcp.c @@ -1385,7 +1385,7 @@ int tcp_tap_handler(struct ctx *c, int af, void *addr, conn = tcp_hash_lookup(c, af, addr, htons(th->source), htons(th->dest)); if (!conn) { - if (th->syn) + if (th->syn && !th->ack) tcp_conn_from_tap(c, af, addr, th, len, now); return 1; } -- cgit v1.2.3