Skip to content
Commit 46ba523b authored by Shrek Wang's avatar Shrek Wang Committed by Benjamin Cabé
Browse files

net: tcp: Align TCP seqence validation with Spec



According to RFC 793, the seqnum test includes 4 cases when STATE >
TCP_SYN_SENT:

      Seg-len Recv-win    Test
      ------- --------    ---------------------------------------
        0       0         SEG.SEQ = RCV.NXT
        0      >0         RCV.NXT =< SEG.SEQ < RCV.NXT+RCV.WND
       >0       0         not acceptable
       >0      >0         RCV.NXT =< SEG.SEQ < RCV.NXT+RCV.WND
                       or RCV.NXT =< SEG.SEQ+SEG.LEN-1 <RCV.NXT+RCV.WND

After the seq validation, the 'send duplicated ACK' code in FIN_WAIT1/
2/CLOSING/TIMEWAIT state processing is duplicated, so remove them.

Added TEST_CLIENT_SEQ_VALIDATION ztest case in tests/net/tcp.

Signed-off-by: default avatarShrek Wang <inet_eman@outlook.com>
parent f8b70ee1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment