|
Bugzilla – Full Text Bug Listing |
| Summary: | m_rWnd not updated when segments without ACK are received | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | natale.patriciello |
| Component: | tcp | Assignee: | ns-bugs <ns-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | natale.patriciello, ns-bugs, tomh |
| Priority: | P5 | ||
| Version: | pre-release | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Attachments: | Patch to fix the problem | ||
Created attachment 2133 [details]
Patch to fix the problem
Added in my testing repo; I plan to add this in mainline after ns3.24 has been released, since (for now) users aren't affected by this problem.
pushed in changeset 11633:6b74df04cf44 |
The incriminated code is: // Update Rx window size, i.e. the flow control window if (tcpHeader.GetFlags () & TcpHeader::ACK) { UpdateWindowSize (tcpHeader); } In one hand, it is correct because UpdateWindowSize manages also the scale of the window (if WindowScale is present), and so it should not be called when a SYN or SYN-ACK is received. However, this leaves m_rWnd set to 0 for SYN and SYN-ACK segments. The correct code would be: // Update Rx window size, i.e. the flow control window if (tcpHeader.GetFlags () & TcpHeader::ACK) { UpdateWindowSize (tcpHeader); } else if (tcpHeader.GetFlags () & TcpHeader::SYN) { /* The window field in a segment where the SYN bit is set (i.e., a <SYN> * or <SYN,ACK>) MUST NOT be scaled (from RFC 7323 page 9). But should be * saved anyway.. */ m_rWnd = tcpHeader.GetWindowSize (); } Discovered & corrected while investigating on zero window state. Patching is easy.