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); 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++; }