aboutsummaryrefslogtreecommitdiff
path: root/contrib/netbsd-tests/lib/libm/t_fmod.c
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2021-02-22 10:58:46 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2021-02-22 16:13:58 +0000
commit9febbc4541903bb8e6b0f1c84988c98b2f7c96ef (patch)
tree39dcefb29aa0ebcc7d947651d202cd1fd14517b0 /contrib/netbsd-tests/lib/libm/t_fmod.c
parent808d4aad1022a2a33d222663b0c9badde30b9d45 (diff)
downloadsrc-9febbc4541903bb8e6b0f1c84988c98b2f7c96ef.tar.gz
src-9febbc4541903bb8e6b0f1c84988c98b2f7c96ef.zip
Fix for natd(8) sending wrong sequence number after TCP retransmission,
terminating a TCP connection. If a TCP packet must be retransmitted and the data length has changed in the retransmitted packet, due to the internal workings of TCP, typically when ACK packets are lost, then there is a 30% chance that the logic in GetDeltaSeqOut() will find the correct length, which is the last length received. This can be explained as follows: If a "227 Entering Passive Mode" packet must be retransmittet and the length changes from 51 to 50 bytes, for example, then we have three cases for the list scan in GetDeltaSeqOut(), depending on how many prior packets were received modulus N_LINK_TCP_DATA=3: case 1: index 0: original packet 51 index 1: retransmitted packet 50 index 2: not relevant case 2: index 0: not relevant index 1: original packet 51 index 2: retransmitted packet 50 case 3: index 0: retransmitted packet 50 index 1: not relevant index 2: original packet 51 This patch simply changes the searching order for TCP packets, always starting at the last received packet instead of any received packet, in GetDeltaAckIn() and GetDeltaSeqOut(). Else no functional changes. Discussed with: rscheff@ Submitted by: Andreas Longwitz <longwitz@incore.de> PR: 230755 MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking
Diffstat (limited to 'contrib/netbsd-tests/lib/libm/t_fmod.c')
0 files changed, 0 insertions, 0 deletions