lwIP - 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 |
Item Group: | Faulty Behaviour | Status: | None |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Open | Planned Release: | None |
lwIP version: | git head |
Sat 27 Jun 2020 02:03:11 AM UTC, comment #3: |
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> |
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.
|
hanhui <hanhui03> |
Depends on the following items: None found
Items that depend on this one: None found
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.
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2020-06-18 | hanhui03 | Attached File | - | Added en2.pcap, #49308 |
Powered by Savane 3.13-02a9.
Corresponding source code
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.