[bug #58612] TCP SACK and Fast retransmission error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #58612] TCP SACK and Fast retransmission error

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

                 Summary: TCP SACK and Fast retransmission error
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: hanhui03
            Submitted on: Thu 18 Jun 2020 03:32:15 PM UTC
                Category: TCP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

LWIP_TCP_SACK_OUT was enabled when compiling lwIP, packet lost occurred during
TCP communication, the remote sent an ACK packet with SACK option, lwIP did
not retransmit, but continued to send data, Later, the remote sent a fast
retransmission request, lwIP did not retransmit the data, but continued to
send data.

The attachment is the network packet capture data.

You can use the "tcp && tcp.port==1081" condition to filter out other packets.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 18 Jun 2020 03:32:15 PM UTC  Name: en2.pcap  Size: 212KiB   By:
hanhui03

<http://savannah.nongnu.org/bugs/download.php?file_id=49308>

    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #58612] TCP SACK and Fast retransmission error

Ashley Duncan
Follow-up Comment #1, bug #58612 (project lwip):

The problem is found, the source port of the TCP retransmission packet is
modified by the previous NAT


    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #58612] TCP SACK and Fast retransmission error

Ashley Duncan
Follow-up Comment #2, bug #58612 (project lwip):

So it's not an lwIP bug? Can I close this then?

    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #58612] TCP SACK and Fast retransmission error

Ashley Duncan
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/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel