File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -848,9 +848,14 @@ tcp_process(struct tcp_pcb *pcb)
848848 }
849849
850850 if ((flags & TCP_SYN ) && (pcb -> state != SYN_SENT && pcb -> state != SYN_RCVD )) {
851- /* Cope with new connection attempt after remote end crashed.
852- * NOTE: We don't process SYN payload here - this is an unexpected SYN
853- * on an already established connection, so we just ACK it and continue. */
851+ #if SYN_WITH_PAYLOAD_ENABLED
852+ /* RFC Compliance: Handle SYN with payload in unexpected states.
853+ * Update rcv_nxt to account for SYN flag and any payload to maintain
854+ * correct sequence tracking and generate proper ACK numbers.
855+ * Note: Sequence nb could be the same becuase we don't intend a new seq nb */
856+ pcb -> rcv_nxt += tcplen ;
857+ #endif
858+ /* Cope with new connection attempt after remote end crashed */
854859 tcp_ack_now (pcb );
855860 return ERR_OK ;
856861 }
You can’t perform that action at this time.
0 commit comments