Obvious TCP RTO calculation are incorrect
Summary
As mentioned by Christian Reusch @CRnetPackets during his live conference (SF21VEU - 12 How to analyze SACK and DSACK with Wireshark) and the following discussion on the Discord meeting, some Retransmission RTOs are still recalcitrant to give the correct value.
Steps to reproduce
Open any capture with a retransmitted packet for which the original packet is also present. Check the RTO in the retransmitted packet and the frame from which it is calculated, these values might be wrong.
What is the current bug behavior?
The retransmitted packet is for now related to a recent packet which might not be consistent with the Sequence numbers analyzed (3.4.9). The master branch however has another behavior (since #12259 (closed)) but still doesn't fix this case when we have both the original and the retransmitted packets.
What is the expected correct behavior?
We should just see the retransmitted packet being related to its predecessor and give the correct RTO value.
Sample capture file
From the conference : sf20v-sacked.pcapng
Relevant logs and/or screenshots
Build information
3.4.9 (v3.4.9-0-g365e236f5efe)
Compiled (64-bit) with Qt 5.15.2, with libpcap, with GLib 2.52.3, with zlib
1.2.11, with SMI 0.4.8, with c-ares 1.15.0, with Lua 5.2.4, with GnuTLS 3.6.3
and PKCS #11 support, with Gcrypt 1.8.3, with MIT Kerberos, with MaxMind DB
resolver, with nghttp2 1.39.2, with brotli, with LZ4, with Zstandard, with
Snappy, with libxml2 2.9.9, with QtMultimedia, with automatic updates using
WinSparkle 0.5.7, with AirPcap, with SpeexDSP (using bundled resampler), with
Minizip.
Running on 64-bit Windows 10 (1803), build 17134, with Intel(R) Core(TM)
i7-6700HQ CPU @ 2.60GHz (with SSE4.2), with 24474 MB of physical memory, with
locale French_France.utf8, with light display mode, without HiDPI, with Npcap
version 1.55, based on libpcap version 1.10.2-PRE-GIT, with GnuTLS 3.6.3, with
Gcrypt 1.8.3, with brotli 1.0.2, without AirPcap, binary plugins supported (21
loaded).
Built using Microsoft Visual Studio 2019 (VC++ 14.29, build 30040).