MODBUS Dissector bug
Summary
For MODBUS protocol, for some bits, their value is not properly displayed in the Packet Details Pane. See the screenshot attached.
Sample capture file
Steps to reproduce
- Open the pcap trace I attached.
- Apply the following display filter "(modbus and modbus.func_code == 1) && (ip.src == 192.168.0.2)".
- Go to frame e.g. number 19.
- See the value of the Bit 109 in the MODBUS protocol tree in the Packet Details Pane. It is 1 on the wire (Packet Bytes Pane), but it is shown as 0 in the Packet Details Pane.
What is the current bug behaviour?
Wrong value of some bits is displayed in the Packet Details Pane.
What is the expected correct behaviour?
There should be a correct value o the bit displayed. See the screenshot.
Build information
wireshark -v
Wireshark 4.4.1 (v4.4.1-0-g575b2bf4746e).
Copyright 1998-2024 Gerald Combs <gerald@wireshark.org> and contributors.
Licensed under the terms of the GNU General Public License (version 2 or later).
This is free software; see the file named COPYING in the distribution. There is
NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled (64-bit) using Clang 14.0.3 (clang-1403.0.22.14.1), with GLib 2.76.6,
with Qt 6.5.3, with libpcap, without POSIX capabilities, with zlib 1.2.11, with
zlib-ng 2.1.6, with PCRE2, with Lua 5.4.6, with GnuTLS 3.8.4 and PKCS #11
support, with Gcrypt 1.10.2, with Kerberos (MIT), with MaxMind, with nghttp2
1.56.0, with nghttp3 0.15.0, with brotli, with LZ4, with Zstandard, with Snappy,
with libxml2 2.11.9, with libsmi 0.4.8, with Minizip 1.3.0, with QtMultimedia,
with automatic updates using Sparkle, with binary plugins.
Running on macOS 13.6, build 22G120 (Darwin 22.6.0), with Apple M2 Pro, with
16384 MB of physical memory, with GLib 2.76.6, with Qt 6.5.3, with libpcap
1.10.1, with zlib 1.2.11, with PCRE2 10.39 2021-10-29, with c-ares 1.19.1, with
GnuTLS 3.8.4, with Gcrypt 1.10.2, with nghttp2 1.56.0, with nghttp3 0.15.0, with
brotli 1.0.9, with LZ4 1.9.4, with Zstandard 1.5.5, with libsmi 0.4.8, with
LC_TYPE=UTF-8, binary plugins supported.
Edited by Wojtek