Check for "is wpcap.dll loaded"? when getting the remote interface list.

That check is required for remote capture just as it's required for
local capture.

Change-Id: I9341ef4aeeef706db9728c8abb8531bec8306bdc
Reviewed-on: https://code.wireshark.org/review/36430
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2020-03-15 02:19:31 -07:00
parent ee39cd988f
commit 8cac5c0a3a
1 changed files with 11 additions and 0 deletions

View File

@ -638,6 +638,17 @@ get_remote_interface_list(const char *hostname, const char *port,
char errbuf[PCAP_ERRBUF_SIZE];
GList *result;
if (!has_wpcap) {
/*
* We don't have Npcap or WinPcap, so we can't get a list of
* interfaces.
*/
*err = DONT_HAVE_PCAP;
if (err_str != NULL)
*err_str = cant_load_winpcap_err("you");
return NULL;
}
if (pcap_createsrcstr(source, PCAP_SRC_IFREMOTE, hostname, port,
NULL, errbuf) == -1) {
*err = CANT_GET_INTERFACE_LIST;