diff options
author | João Valverde <j@v6e.pt> | 2022-02-24 17:07:45 +0000 |
---|---|---|
committer | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2022-02-24 21:15:51 +0000 |
commit | 8cd49b2da0d23562fdc4ef80080a88e50279b458 (patch) | |
tree | f15bdae612f51128bde6618921b46f98c15d55c4 /dumpcap.c | |
parent | ac6cbbcda3bff6d7c02a8252f9d07b3fd80e402f (diff) |
dumpcap: Fix a TODO for Npcap test
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 25 |
1 files changed, 9 insertions, 16 deletions
@@ -3863,33 +3863,26 @@ capture_loop_dequeue_packet(void) { static char * handle_npcap_bug(char *adapter_name _U_, char *cap_err_str _U_) { - GString *pcap_info_str; - GString *windows_info_str; - char *msg; - - pcap_info_str = g_string_new(""); - // TODO: test directly for Npcap here, so we can remove - // get_runtime_caplibs_version() - get_runtime_caplibs_version(pcap_info_str); - if (!g_str_has_prefix(pcap_info_str->str, "Npcap")) { + gboolean have_npcap = FALSE; + +#ifdef _WIN32 + have_npcap = caplibs_have_npcap(); +#endif + + if (!have_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 = ws_strdup_printf("If you have not removed that adapter, this " + + return ws_strdup_printf("If you have not removed that adapter, this " "is probably a known issue in Npcap resulting from " "the behavior of the Windows networking stack. " "Work is being done in Npcap to improve the " "handling of this issue; it does not need to " "be reported as a Wireshark or Npcap bug."); - g_string_free(windows_info_str, TRUE); - g_string_free(pcap_info_str, TRUE); - return msg; } /* Do the low-level work of a capture. |