mirror of
https://passt.top/passt
synced 2024-12-22 13:45:32 +00:00
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:
parent
330ea9e681
commit
60dee2705b
2
tcp.c
2
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));
|
conn = tcp_hash_lookup(c, af, addr, htons(th->source), htons(th->dest));
|
||||||
if (!conn) {
|
if (!conn) {
|
||||||
if (th->syn)
|
if (th->syn && !th->ack)
|
||||||
tcp_conn_from_tap(c, af, addr, th, len, now);
|
tcp_conn_from_tap(c, af, addr, th, len, now);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user