aboutgitcodebugslistschat
path: root/tcp.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-07-21 17:48:33 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-07-21 17:48:33 +0200
commit60dee2705b3a9a8b1c3302b94b098c2d07b41a85 (patch)
tree24105f658b18d85f71d05f4d5268fd01bb6871d7 /tcp.c
parent330ea9e681d3b1302ad9ecd46b2046878971850f (diff)
downloadpasst-60dee2705b3a9a8b1c3302b94b098c2d07b41a85.tar
passt-60dee2705b3a9a8b1c3302b94b098c2d07b41a85.tar.gz
passt-60dee2705b3a9a8b1c3302b94b098c2d07b41a85.tar.bz2
passt-60dee2705b3a9a8b1c3302b94b098c2d07b41a85.tar.lz
passt-60dee2705b3a9a8b1c3302b94b098c2d07b41a85.tar.xz
passt-60dee2705b3a9a8b1c3302b94b098c2d07b41a85.tar.zst
passt-60dee2705b3a9a8b1c3302b94b098c2d07b41a85.zip
tcp: Don't open a new connection from tap if both SYN and ACK are set
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp.c')
-rw-r--r--tcp.c2
1 files changed, 1 insertions, 1 deletions
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;
}