aboutsummaryrefslogtreecommitdiffstats
path: root/dumpcap.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-02-09 11:38:51 -0800
committerGuy Harris <gharris@sonic.net>2021-02-09 11:38:51 -0800
commit99c712ff5a2f4d2d52f90d6f3c711ab6c7990a35 (patch)
tree37865cdbc6fbb9c261580048e564d129160fd4c3 /dumpcap.c
parent7e063b60705b573d48ff0185a91bd236466a6757 (diff)
dumpcap: don't mention Npcap if we're not using it.
Diffstat (limited to 'dumpcap.c')
-rw-r--r--dumpcap.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/dumpcap.c b/dumpcap.c
index 27ee5662e6..24c8a610ab 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -3842,12 +3842,22 @@ capture_loop_dequeue_packet(void) {
static char *
please_report_npcap_bug(char *adapter_name, char *cap_err_str)
{
- GString *windows_info_str = g_string_new("");
- GString *pcap_info_str = g_string_new("");
+ GString *pcap_info_str;
+ GString *windows_info_str;
char *msg;
- get_os_version_info(windows_info_str);
+ pcap_info_str = g_string_new("");
get_runtime_caplibs_version(pcap_info_str);
+ if (!g_str_has_prefix(pcap_info_str->str, "with Npcap")) {
+ /*
+ * We're not using Npcap, so don't recomment a user
+ * file a bug against Npcap.
+ */
+ g_string_free(pcap_info_str, TRUE);
+ return g_strdup("");
+ }
+ windows_info_str = g_string_new("");
+ get_os_version_info(windows_info_str);
msg = g_strdup_printf("If you have not removed that adapter, this "
"may be a bug in Npcap: please report it "
"as an issue at https://github.com/nmap/npcap/issues\n\n"