You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The messager variable their_contiguous_sent_bytes, tracking the number of contiguous bytes that have been successfully received is not updated correctly when packets are reordered.
Imagine the following scenario:
Currently bytes 0 - 12480 have been successfully received, ACKed (their_contiguous_sent_bytes = 12480) and distributed (removed from the receive queue).
Because of packet reordering, block 14528 - 15552 is received next and is SACKed and marked as acknowledged in the receive queue. Since some blocks in front of it are missing, the block is not yet distributed.
Blocks 12480 - 14528 are received next and are SACKed. Bytes 12480 - 15552 are distributed and removed from the receive queue. The first acknowledgement range now covers bytes 0 - 14528 and their_contiguous_sent_bytes is updated to 14528. At this point, this sent bytes counter is stuck at this value and will never be incremented again.
This wrong behavior causes two issues:
Selective ACKs will be unnecessarily fragmented as one SACK range will always cover 0 - 14528 (due to their_contiguous_sent_bytes being stuck at 14528).
EOF will not be handled correctly, as messager will assume that some bytes still need to be received.
A workaround that I currently use in my Boost.ASIO C++ bindings is that when bytes are distributed, I update the their_contiguous_sent_bytes counter as follows:
// Update the number of contiguous sent bytesif (messager_.their_contiguous_sent_bytes < recvmarkq_distributed_)
messager_.their_contiguous_sent_bytes = recvmarkq_distributed_;
The text was updated successfully, but these errors were encountered:
The messager variable
their_contiguous_sent_bytes
, tracking the number of contiguous bytes that have been successfully received is not updated correctly when packets are reordered.Imagine the following scenario:
their_contiguous_sent_bytes = 12480
) and distributed (removed from the receive queue).their_contiguous_sent_bytes
is updated to 14528. At this point, this sent bytes counter is stuck at this value and will never be incremented again.This wrong behavior causes two issues:
their_contiguous_sent_bytes
being stuck at 14528).A workaround that I currently use in my Boost.ASIO C++ bindings is that when bytes are distributed, I update the
their_contiguous_sent_bytes
counter as follows:The text was updated successfully, but these errors were encountered: