lwIP - A Lightweight TCP/IP stack - Bugs: bug #48839, Possible bug with snd_wnd semantics
You are not allowed to post comments on this tracker with your current authentication level.
bug #48839: Possible bug with snd_wnd semantics
Submitter: | Ambroz Bizjak <abizjak> | ||
Submitted: | Sun 21 Aug 2016 12:02:51 PM UTC | ||
Category: | TCP | Severity: | 3 - Normal |
Item Group: | Faulty Behaviour | Status: | Confirmed |
Privacy: | Public | Assigned to: | goldsimon |
Open/Closed: | Open | Planned Release: | None |
lwIP version: | git head |
Mon 22 Aug 2016 07:49:50 AM UTC, comment #3: |
Ambroz Bizjak <abizjak> |
Mon 22 Aug 2016 07:16:44 AM UTC, comment #2: I see this is a theoretical inconsistency in lwIP's usage of variables. And having code where two 'if' clauses depend on different input but trigger at the same time is bad coding style.
|
Simon Goldschmidt <goldsimon> |
Sun 21 Aug 2016 12:04:37 PM UTC, comment #1: s/snd_wl1/snd_wl2/g |
Ambroz Bizjak <abizjak> |
Sun 21 Aug 2016 12:02:51 PM UTC, original submission:
Hi,
|
Ambroz Bizjak <abizjak> |
No files currently attached
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.
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2016-08-22 | goldsimon | Status | None | Confirmed | |
Assigned to | None | goldsimon |
Powered by Savane 3.13-02a9.
Corresponding source code
Hi Simon,
I think retransmissions can trigger a lastack update without a window update.
- Remote sends two data segments with consecutive data; the first has a lower sequence number than the second.
- Lwip receives the second segment only as the first one is lost. It updates the window based on the second segment.
- The remote later retransmits the first segment. It will have the lower sequence number of the first segment but it will have the newest ack value (rcv_nxt of remote), greater than the one of both the first and second segment originally sent, due to the remote having received some data.
- Lwip receives the retransmitted first segment. A window update is inhibited (details [1]) since the ack number acknowledges new data, lastack is updated. The window is effectively now too large.
The other kind of inconsistency seems less likely to me.
[1] The retransmitted segment has SEQ lesser than snd_wl1 and ACK different from the snd_wl2, which is sufficient to pass /* Update window. */