tcp: Don't open a new connection from tap if both SYN and ACK are set

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-07-21 17:48:33 +02:00
parent 330ea9e681
commit 60dee2705b

2
tcp.c
View file

@ -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;
}