SRT values are incorrect when applying a time shift.
Summary
When applying a time shift, SRT tables and most relative times like smb2.time and tcp.time_relative include the time shift.
Steps to reproduce
- Open https://wiki.wireshark.org/uploads/moin_import/attachments/SMB2/smb2-peter.pcap
- Open frame 40
- TCP [Timestamps] section has "[Time since first frame in this TCP stream: 10.060220000 seconds]"
- SMB2 Header section has "[Time from request: 0.004834000 seconds]"
- Apply a time shift Ctrl-Shift-T and add 1 hour (1:00:00)
- TCP now reports "[Time since first frame in this TCP stream: 3610.060220000 seconds]"
- SMB2 now reports "[Time from request: 3600.004834000 seconds]"
- Open Statistics->"Service Response Time"->SMB2
- Observe that all values are slightly longer than 3600 seconds
What is the current bug behavior?
Wireshark calculates time deltas nstime_delta() relative to pinfo->abs_ts, assuming that the value does not change.
What is the expected correct behavior?
The relative times should be unchanged after applying a time shift.
Sample capture file
I have a 12 MB collection covering more than 50 dissectors with this problem. I can upload them at request.
Relevant logs and/or screenshots
Before time shift:
After time shift:
Build information
Version 4.1.0 (v4.1.0rc0-2212-g9a4c503eec40).
Compiled (64-bit) using GCC 10.2.1 20210110, with GLib 2.66.8, with Qt 6.4.2,
with libpcap, with POSIX capabilities (Linux), with libnl 3, with zlib 1.2.11,
with PCRE2, with Lua 5.2.4, with GnuTLS 3.7.1 and PKCS #11 support, with Gcrypt
1.8.8, with Kerberos (MIT), with MaxMind, with nghttp2 1.43.0, with brotli, with
LZ4, with Zstandard, with Snappy, with libxml2 2.9.10, with libsmi 0.4.8,
without QtMultimedia, without automatic updates, with Minizip, with binary
plugins, debug build (+utf8).
Running on Linux 5.15.90.1-microsoft-standard-WSL2, with AMD Ryzen 5 4500U with
Radeon Graphics (with SSE4.2), with 7628 MB of physical memory, with GLib
2.66.8, with Qt 6.4.2, with libpcap 1.10.0 (with TPACKET_V3), with zlib 1.2.11,
with PCRE2 10.36 2020-12-04, with c-ares 1.17.1, with GnuTLS 3.7.1, with Gcrypt
1.8.8, with nghttp2 1.43.0, with brotli 1.0.9, with LZ4 1.9.3, with Zstandard
1.4.8, with libsmi 0.4.8, with light display mode, without HiDPI, with
LC_TYPE=en_US.UTF-8, binary plugins supported.
Edited by Preben Guldberg