Skip to content

Conversation

@wenquan2015
Copy link

@wenquan2015 wenquan2015 commented Dec 26, 2025

Summary

Check tcp header sndseq and ackseq according to RFC 793.

Impact

tcp

Testing

enable iperf,check iperf test ok

nsh> iperf -c 10.0.1.1 -p 5000
     IP: 10.0.1.2

 mode=tcp-client sip=10.0.1.2:5001,dip=10.0.1.1:5000, interval=3, time=30

           Interval         Transfer         Bandwidth

   0.00-  14.95 sec  771506176 Bytes  412.85 Mbits/sec
  14.95-  22.38 sec  383320064 Bytes  412.73 Mbits/sec
  22.38-  74.93 sec 2801467392 Bytes  426.48 Mbits/sec
   0.00-  74.93 sec 8211726336 Bytes  876.74 Mbits/sec
iperf exit
nsh> iperf -s -p 5000
     IP: 10.0.1.2

 mode=tcp-server sip=10.0.1.2:5000,dip=0.0.0.0:5001, interval=3, time=0
accept: 10.0.1.1:34522

           Interval         Transfer         Bandwidth

   0.00-   3.24 sec  234598764 Bytes  579.26 Mbits/sec
closed by the peer: 10.0.1.1:34522
iperf exit
   3.24-  10.00 sec  581848784 Bytes  688.58 Mbits/sec
   0.00-  10.00 sec  816447548 Bytes  653.16 Mbits/sec
nsh>

@github-actions github-actions bot added Area: Networking Effects networking subsystem Size: M The size of the change in this PR is medium labels Dec 26, 2025
@wangchdo
Copy link
Contributor

wangchdo commented Dec 26, 2025

The Change ID should be removed from the commit message.

Do you have any idea why this PR did not trigger the CI? @simbit18

@xiaoxiang781216
Copy link
Contributor

The Change ID should be removed from the commit message.

Do you have any idea why this PR did not trigger the CI? @simbit18

The first pr from new contributor need be approved manually to filter the garbage patch.

wenquan1 added 8 commits December 26, 2025 20:50
…th OTW SEQ number in SYN-RCVD state

According rfc793 p69, In SYN-RCVD state, if the incoming segment is not acceptable, an acknowledgment should be sent in reply (unless the RST bit is set):
<SEQ=SND.NXT><ACK=RCV.NXT><CTL=ACK>

Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
… number except SYN-SEND state

According rfc793 p69, from state SYN-RECEIVED to state TIME-WAIT, if the incoming segment is not acceptable, an acknowledgment should be sent in reply (unless the RST bit is set):
<SEQ=SND.NXT><ACK=RCV.NXT><CTL=ACK>

Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
… then enter the closed state

According rfc793 p71, after step1 check OTW seq, and step2 check RST flag, then check syn flag.

Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
…-send state

ignore a segment carrying an unacceptable ACK and RST in syn-send state
Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
… state

Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
@xiaoxiang781216
Copy link
Contributor

@wenquan2015 please fix:

../nuttx/tools/checkpatch.sh -c -u -m -g 4a069358b6cbd7acf377f1e32e359c480a5a9679..HEAD
❌ Missing git commit message
❌ Missing git commit message
❌ Missing git commit message
❌ Missing git commit message
❌ Missing git commit message
❌ Commit subject too long > 80
❌ Commit subject too long > 80
❌ Commit subject too long > 80
Used config files:
    1: .codespellrc
Some checks failed. For contributing guidelines, see:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Networking Effects networking subsystem Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants