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 cmake:complete missing changes during reforming for net 2023-09-13 21:51:20 +08:00
Kconfig net/tcp: Support initial sequence number described in RFC 6528 2023-11-06 09:04:09 +08:00
Make.defs net/tcp:Add NewReno congestion control. 2023-05-16 12:35:01 -03:00
tcp_accept.c net/assert: remove all unnecessary check for psock/conn 2023-08-30 20:36:49 +08:00
tcp_appsend.c net/tcp: reuse common api to replace some ip select code 2023-01-30 11:25:10 +08:00
tcp_backlog.c mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
tcp_callback.c net: Rename tcp_dataconcat to net_iob_concat 2023-07-18 10:51:45 +08:00
tcp_cc.c net/tcp:Add NewReno congestion control. 2023-05-16 12:35:01 -03:00
tcp_close.c net/assert: remove all unnecessary check for psock/conn 2023-08-30 20:36:49 +08:00
tcp_conn.c net/inet: Rename ttl to s_ttl in sconn. 2024-06-05 23:22:15 +08:00
tcp_connect.c net: Support multiple IPv6 address per netdev 2023-11-07 19:30:36 +08:00
tcp_devpoll.c net/tcp: reuse common api to replace some ip select code 2023-01-30 11:25:10 +08:00
tcp_dump.c
tcp_finddev.c net: modify find device logic 2023-02-12 01:25:34 +08:00
tcp_getsockopt.c tcp: decouple TCP_NODELAY and NET_TCP_KEEPALIVE 2024-04-29 17:45:14 +08:00
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 net: Simplify getting value for different domain 2023-11-03 22:23:50 +08:00
tcp_ipselect.c net/tcp: reuse common api to replace some ip select code 2023-01-30 11:25:10 +08:00
tcp_listen.c
tcp_monitor.c net/assert: remove all unnecessary check for psock/conn 2023-08-30 20:36:49 +08:00
tcp_netpoll.c poll: pollsetup should notify only one fd passd by caller 2023-11-21 09:07:17 +01:00
tcp_notifier.c Typo fixes. 2023-02-17 11:17:11 -03:00
tcp_recvfrom.c net: Add msg_peek support for udp and tcp 2023-07-13 19:40:04 +08:00
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 net: Only call arp_send for PF_INET and icmpv6_neighbor for PF_INET6 2024-01-09 05:56:28 -08:00
tcp_seqno.c net/tcp: Support initial sequence number described in RFC 6528 2023-11-06 09:04:09 +08:00
tcp_setsockopt.c tcp: decouple TCP_NODELAY and NET_TCP_KEEPALIVE 2024-04-29 17:45:14 +08:00
tcp_shutdown.c net: remove conn-related casts 2023-05-10 19:32:09 -03:00
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 net/assert: remove all unnecessary check for psock/conn 2023-08-30 20:36:49 +08:00
tcp_wrbuffer.c net/xx/wrbuffer: Do not use SEM_INITIALIZER for buffers 2023-08-25 00:02:07 +08:00
tcp.h net/tcp: Support initial sequence number described in RFC 6528 2023-11-06 09:04:09 +08:00