buglwIP - A Lightweight TCP/IP stack - Bugs: bug #58612, TCP SACK and Fast retransmission...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #58612: TCP SACK and Fast retransmission error

Submitter:  hanhui <hanhui03>
Submitted:  Thu 18 Jun 2020 03:32:15 PM UTC
   
 
Category:  TCP Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Faulty Behaviour
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Planned Release:  None lwIP version:  git head

Discussion

Sat 27 Jun 2020 02:03:11 AM UTC, comment #3: 

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.

hanhui <hanhui03>
Wed 24 Jun 2020 05:22:10 AM UTC, comment #2: 

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

Simon Goldschmidt <goldsimon>
Group administrator
Sat 20 Jun 2020 04:14:35 AM UTC, comment #1: 

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

hanhui <hanhui03>
Thu 18 Jun 2020 03:32:15 PM UTC, original submission:  

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.

hanhui <hanhui03>

 

Attached Files

Attached Files
file #49308:  en2.pcap added by hanhui03 (212KiB - application/octet-stream)

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by hanhui03 (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    History

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-06-18 hanhui03 Attached File- Added en2.pcap, #49308

    Back to the top

    Powered by Savane 3.16-1eaf.
    Corresponding source code