Extcap with configuration never starts; "Configure all extcaps before start of capture." is shown instead
Summary
Wireshark refuses to start external capture interfaces that declare a required config, even if the config has some non-empty (default) value.
This is likely a regression of 428f2228 (from !5554 (merged)). Relevant logic:
-
extcap_has_configuration(...)
is used inLograyMainWindow::startCapture
(https://gitlab.com/wireshark/wireshark/-/blob/f86a0d5ab4c408e8a7907f9e54194076820cc268/ui/logray/logray_main_window_slots.cpp#L827). -
extcap_has_configuration
is defined in https://gitlab.com/wireshark/wireshark/-/blob/f86a0d5ab4c408e8a7907f9e54194076820cc268/extcap.c#L1025
Steps to reproduce
- Put the attached minimal extcap in
~/.wireshark/extcap/dummy-example.sh
. Attachment: dummy-example.sh - Open Wireshark, and double-click the "Dummy Example: dummy-example-if" interface to start.
- If a config dialog is shown:
- Uncheck the "Save parameter(s) on capture" start option.
- Click Start.
What is the current bug behavior?
The capture does not start; the dialog shows again, now with "Save" instead of "Start". The error "Configure all extcaps before start of capture." is shown in status bar instead.
The bug is not observed under the following conditions:
- When the "Save parameter(s) on capture" option is chosen.
- AND the required config value is changed from the default, when a required config has a specified default value.
- OR parameters were previously saved that match the two conditions above.
What is the expected correct behavior?
Capture should start. The attached dummy capture script will just exit and show "Capture successfully started. Intentionally exiting".
Sample capture file
N/A. Capture failed.
Relevant logs and/or screenshots
No relevant logs, other than the message in the status bar:
"Configure all extcaps before start of capture."
Build information
Version 4.0.0 (Git v4.0.0 packaged as 4.0.0-1).
Compiled (64-bit) using GCC 12.2.0, with GLib 2.74.0, with PCRE2, with zlib
1.2.12, with Qt 5.15.6, with libpcap, with POSIX capabilities (Linux), with
libnl 3, with Lua 5.2.4, with GnuTLS 3.7.8 and PKCS #11 support, with Gcrypt
1.10.1-unknown, with Kerberos (MIT), with MaxMind, with nghttp2 1.50.0, with
brotli, with LZ4, with Zstandard, with Snappy, with libxml2 2.10.2, without
libsmi, with QtMultimedia, without automatic updates, with SpeexDSP (using
system library), with Minizip, with binary plugins.
Running on Linux 5.17.1-arch1-1, with Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
(with SSE4.2), with 64161 MB of physical memory, with GLib 2.74.0, with PCRE2
10.40 2022-04-14, with zlib 1.2.13, with Qt 5.15.6, with libpcap 1.10.1 (with
TPACKET_V3), with c-ares 1.18.1, with GnuTLS 3.7.8, with Gcrypt 1.10.1-unknown,
with nghttp2 1.50.0, with brotli 1.0.9, with LZ4 1.9.4, with Zstandard 1.5.2,
with dark display mode, without HiDPI, with LC_TYPE=en_US.UTF-8, binary plugins
supported.