nuttx/net/tcp
zhanghongyu 3c4897310b tcp_input: if tcp->req > recvreq, send ack only when state is TCP_ESTABLISHED
The Bluetooth network on N62 does not retransmit packet, so no packet
retransmition if we drop one, 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>
2024-08-20 08:31:55 +02:00
..
CMakeLists.txt
Kconfig
Make.defs
tcp_accept.c
tcp_appsend.c
tcp_backlog.c
tcp_callback.c
tcp_cc.c
tcp_close.c
tcp_conn.c net/inet: Rename ttl to s_ttl in sconn. 2024-06-05 23:22:15 +08:00
tcp_connect.c
tcp_devpoll.c
tcp_dump.c
tcp_finddev.c
tcp_getsockopt.c
tcp_input.c tcp_input: if tcp->req > recvreq, send ack only when state is TCP_ESTABLISHED 2024-08-20 08:31:55 +02:00
tcp_ioctl.c
tcp_ipselect.c
tcp_listen.c
tcp_monitor.c
tcp_netpoll.c
tcp_notifier.c
tcp_recvfrom.c
tcp_recvwindow.c
tcp_send_buffered.c net:Support jumbo frame prealloc the iob for the ICMP/UDP/TCP. 2024-06-02 09:31:37 -03:00
tcp_send_unbuffered.c net/tcp: fix missing error code propagation 2024-06-22 19:26:14 -03:00
tcp_send.c net/inet: Rename ttl to s_ttl in sconn. 2024-06-05 23:22:15 +08:00
tcp_sendfile.c
tcp_seqno.c
tcp_setsockopt.c
tcp_shutdown.c
tcp_timer.c tcp_timer.c:solve Problem of parameter calculation exceeding the boundary 2024-08-20 13:51:39 +08:00
tcp_txdrain.c
tcp_wrbuffer.c
tcp.h