diff options
Diffstat (limited to 'src/libknot/xdp/tcp.c')
-rw-r--r-- | src/libknot/xdp/tcp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libknot/xdp/tcp.c b/src/libknot/xdp/tcp.c index 94d445c..eae73a9 100644 --- a/src/libknot/xdp/tcp.c +++ b/src/libknot/xdp/tcp.c @@ -353,7 +353,10 @@ int knot_tcp_recv(knot_tcp_relay_t *relays, knot_xdp_msg_t msgs[], uint32_t msg_ bool synack = (msg->flags & KNOT_XDP_MSG_ACK); knot_tcp_table_t *add_table = tcp_table; - if (syn_table != NULL && !synack) { + if (syn_table != NULL) { + if (synack) { + break; // creating conn based on SYN+ACK is only for kxdpgun, disallow in knotd + } add_table = syn_table; if (*tcp_table_lookup(&msg->ip_from, &msg->ip_to, &conn_hash, syn_table) != NULL) { break; @@ -383,7 +386,7 @@ int knot_tcp_recv(knot_tcp_relay_t *relays, knot_xdp_msg_t msgs[], uint32_t msg_ break; case KNOT_XDP_MSG_ACK: if (!seq_ack_match) { - if (syn_table != NULL && msg->payload.iov_len == 0 && + if (syn_table != NULL && msg->payload.iov_len == 0 && conn == NULL && (pconn = tcp_table_lookup(&msg->ip_from, &msg->ip_to, &conn_hash, syn_table)) != NULL && (conn = *pconn) != NULL && check_seq_ack(msg, conn)) { // move conn from syn_table to tcp_table |