lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #58612] TCP SACK and Fast retransmission error


From: hanhui
Subject: [lwip-devel] [bug #58612] TCP SACK and Fast retransmission error
Date: Fri, 26 Jun 2020 22:03:11 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36

Follow-up Comment #3, bug #58612 (project lwip):

It is recommended that you can judge when the TCP packet is sent by the
tcp_output_segment() function. If it is a retransmission, fill in the TCP
packet header source port again:

   len = (u16_t)((u8_t *)seg->tcphdr-(u8_t *)seg->p->payload);
   if (len == 0) {
     /** Exclude retransmitted segments from this count. */
     MIB2_STATS_INC(mib2.tcpoutsegs);
   } else {
     /** NAT output local tcp packet will change the packet source port
      * If this is retransmit packet the header source port has already
changed
      * so here we change it back */
     seg->tcphdr->src = lwip_htons(pcb->local_port);
   }

Of course, if there is no NAT, the previous code behavior is correct.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?58612>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]