netstack: revert SND.NXT when purging the write queue
There are only 3 places we remove from the write queue. The other two are
fairly self-contained and don't look suspicious. They are:
tcp.sender.maybeSendSegment - removes iff the segments are merged
tcp.sender.handleRcvdSegment - removes iff the whole segment is covered by an
incoming ACK
Given that the panic occurs when the write queue is empty and SND.NXT !=
SND.UNA, the bug likely occurs when either the writeList removes a segment or
SND.NXT increments.
netstack: revert SND.NXT when purging the write queue
There are only 3 places we remove from the write queue. The other two are fairly self-contained and don't look suspicious. They are:
Given that the panic occurs when the write queue is empty and SND.NXT != SND.UNA, the bug likely occurs when either the writeList removes a segment or SND.NXT increments.