mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
net/tcp(unbuffered): advance sndseq by +1 because SYN and FIN occupy one sequence number (RFC 793)
This commit is contained in:
committed by
Masayuki Ishikawa
parent
d23ad9b9b0
commit
e9ab3adf23
@@ -317,6 +317,11 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
|
||||
* SYNACK.
|
||||
*/
|
||||
|
||||
#if !defined(CONFIG_NET_TCP_WRITE_BUFFERS)
|
||||
tcp_setsequence(conn->sndseq, conn->rexmit_seq);
|
||||
#else
|
||||
/* REVISIT for the buffered mode */
|
||||
#endif
|
||||
tcp_synack(dev, conn, TCP_ACK | TCP_SYN);
|
||||
goto done;
|
||||
|
||||
@@ -324,6 +329,11 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
|
||||
|
||||
/* In the SYN_SENT state, we retransmit out SYN. */
|
||||
|
||||
#if !defined(CONFIG_NET_TCP_WRITE_BUFFERS)
|
||||
tcp_setsequence(conn->sndseq, conn->rexmit_seq);
|
||||
#else
|
||||
/* REVISIT for the buffered mode */
|
||||
#endif
|
||||
tcp_synack(dev, conn, TCP_SYN);
|
||||
goto done;
|
||||
|
||||
@@ -344,6 +354,11 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
|
||||
|
||||
/* In all these states we should retransmit a FINACK. */
|
||||
|
||||
#if !defined(CONFIG_NET_TCP_WRITE_BUFFERS)
|
||||
tcp_setsequence(conn->sndseq, conn->rexmit_seq);
|
||||
#else
|
||||
/* REVISIT for the buffered mode */
|
||||
#endif
|
||||
tcp_send(dev, conn, TCP_FIN | TCP_ACK, hdrlen);
|
||||
goto done;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user