mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 05:42:05 +08:00
d5d9c501fa
we will drop packet when tcp_close_eventhandler is register and invoke by tcp_input. then we will always early return and never stop, the peer will only close the connection if we send reset packet. precondition: close -> register tcp_close_eventhandler; tcp_input -> tcp_callback(TCP_NEWDATA) -> devif_conn_event -> tcp_close_eventhandler -> flags &= ~TCP_NEWDATA -> NOT entry tcp_data_event -> conn->recvreq NOT increase old flow: tcp_input -> tcp->seqno greater than conn->rcvseq -> tcp_send(TCP_ACK) with this patch: tcp_input -> tcp->seqno greater than conn->rcvseq -> !TCP_ESTABLISHED -> case TCP_FIN_WAIT_1 -> dev->d_len greater than 0 -> tcp_reset Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>