Commit e28d6f6d authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't update packetmap for non-increasing seqnos.

When using an identity packetmap, we used to update the next seqno
even when packets were not increasing.  Not a big deal, we'd still
recover at the next sequential packet.
parent 397892d9
......@@ -30,8 +30,11 @@ func (m *Map) Map(seqno uint16, pid uint16) (bool, uint16, uint16) {
defer m.mu.Unlock()
if m.delta == 0 && m.entries == nil {
m.next = seqno + 1
m.nextPid = pid
if compare(m.next, seqno) <= 0 ||
uint16(m.next - seqno) > 8 * 1024 {
m.next = seqno + 1
m.nextPid = pid
}
return true, seqno, 0
}
......
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