zhhyu7 opened a new pull request, #17710:
URL: https://github.com/apache/nuttx/pull/17710
## Summary
in the current process, if tcpstate is at TCP_FIN_WAIT_1, TCP_CLOSING, and
TCP_LAST_ACK, and the peer does not reply TCP_ACK, it will be retransmitted
permanently. to avoid continuous occupation of resources, now when the
retransmission equals TCP_MAXRTX, a reset message will be sent and the conn
resources will be reclaimed in tcp_close_work.
## Impact
tcp::close
## Testing
cortex-m33 board.
Since this issue requires an abnormal TCP server, it is not easy to
construct test cases. However, we have verified in internal projects that this
fix meets expectations.
Based on the community version, it has been verified that the normal
communication of TCP is not affected.
```
NuttShell (NSH) NuttX-12.12.0-RC0
MOTD: username=admin password=Administrator
nsh> iperf -c 10.0.1.1 -B 10.0.1.2
IP: 10.0.1.2
mode=tcp-client sip=10.0.1.2:5001,dip=10.0.1.1:5001, interval=3, time=30
Interval Transfer Bandwidth
0.00- 18.02 sec 1153712128 Bytes 512.19 Mbits/sec
18.02- 22.00 sec 252887040 Bytes 508.32 Mbits/sec
22.00- 25.12 sec 197541888 Bytes 506.52 Mbits/sec
25.12- 28.14 sec 192479232 Bytes 509.88 Mbits/sec
28.14- 32.96 sec 305283072 Bytes 506.69 Mbits/sec
0.00- 32.96 sec 2150252544 Bytes 521.91 Mbits/sec
iperf exit
nsh> iperf -s -B 10.0.1.2
IP: 10.0.1.2
mode=tcp-server sip=10.0.1.2:5001,dip=0.0.0.0:5001, interval=3, time=0
accept: 10.0.1.1:37678
Interval Transfer Bandwidth
0.00- 3.95 sec 268279440 Bytes 543.35 Mbits/sec
3.95- 7.02 sec 207895564 Bytes 541.75 Mbits/sec
closed by the peer: 10.0.1.1:37678
iperf exit
nsh>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]