From 56eb0cea3a12f338b2a05b73e31ce279bad767fa Mon Sep 17 00:00:00 2001 From: Jakob Wyatt Date: Mon, 23 Mar 2026 21:03:28 +1100 Subject: [PATCH 1/2] Fix send_seq not including FIN in EXA_TCP_FIN_WAIT_2 --- libs/exasock/tcp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/exasock/tcp.h b/libs/exasock/tcp.h index 3b53239..c9bf97d 100644 --- a/libs/exasock/tcp.h +++ b/libs/exasock/tcp.h @@ -478,7 +478,7 @@ exa_tcp_build_ctrl(struct exa_tcp_conn * restrict ctx, char ** restrict hdr, case EXA_TCP_FIN_WAIT_2: /* Send ACK */ - h->th_seq = htonl(state->send_seq); + h->th_seq = htonl(state->send_seq + 1); h->th_ack = htonl(recv_seq); h->th_flags = TH_ACK; PROFILE_INFO_TCP_TX_RX_EVENT(false, ctx, EXA_TCP_FIN_WAIT_2, 0, 1, state->send_seq, recv_seq); From 927c8c28d19037b4c2247c75f85066787f0745d4 Mon Sep 17 00:00:00 2001 From: Jakob Wyatt Date: Tue, 24 Mar 2026 21:15:15 +1100 Subject: [PATCH 2/2] increment seqnum when sending from EXA_TCP_FIN_WAIT_2 in kernel module --- modules/exasock/exasock-tcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/exasock/exasock-tcp.c b/modules/exasock/exasock-tcp.c index 18775e0..6872058 100644 --- a/modules/exasock/exasock-tcp.c +++ b/modules/exasock/exasock-tcp.c @@ -3817,7 +3817,8 @@ static void exasock_tcp_send_ack(struct exasock_tcp *tcp, bool dup) struct exa_socket_state *state = tcp->user_page; uint32_t seq = state->p.tcp.send_seq; if (state->p.tcp.state == EXA_TCP_TIME_WAIT || - state->p.tcp.state == EXA_TCP_CLOSING) + state->p.tcp.state == EXA_TCP_CLOSING || + state->p.tcp.state == EXA_TCP_FIN_WAIT_2) { seq++; }