Commit 12b746ba authored by Robert Ricci's avatar Robert Ricci

Fix another packet sensor bug - the ACK number is *not* the sequence

number being ACKed - it's the next one the peer expects. So, the thing
being acked is actually one less.
parent 5c6df873
......@@ -110,9 +110,17 @@ void PacketSensor::localAck(PacketInfo * packet)
bool found = false;
ackedSize = 0;
* When we get an ACK, the sequence number is really the next one the peer
* excects to see: thus, the last sequence number it's ACKing is one less
* than this.
* XXX: Handle wraparound
uint32_t ack_for = ntohl(packet->tcp->ack_seq) - 1;
while (pos != limit && !found)
found = pos->inSequenceBlock(ntohl(packet->tcp->ack_seq));
found = pos->inSequenceBlock(ack_for);
* XXX: Assumes that SACK is not in use - assumes that this ACK is for all
* sequence numbers up to the one it's ACKing
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment