diff options
author | Guy Harris <gharris@sonic.net> | 2021-02-09 11:38:51 -0800 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-02-09 11:38:51 -0800 |
commit | 99c712ff5a2f4d2d52f90d6f3c711ab6c7990a35 (patch) | |
tree | 37865cdbc6fbb9c261580048e564d129160fd4c3 /dumpcap.c | |
parent | 7e063b60705b573d48ff0185a91bd236466a6757 (diff) |
dumpcap: don't mention Npcap if we're not using it.
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -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" |