Extcap: allow Wireshark to list extcap interfaces even when WinPcap / Npcap is not...
authorPascal Quantin <pascal.quantin@gmail.com>
Mon, 16 Nov 2015 11:23:17 +0000 (12:23 +0100)
committerAnders Broman <a.broman58@gmail.com>
Tue, 17 Nov 2015 08:17:38 +0000 (08:17 +0000)
Bug: 11715
Change-Id: I4a043c4a298506d51cb6bf8b97aac787113a7dfa
Reviewed-on: https://code.wireshark.org/review/11869
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Guenter Ebermann <guenter.ebermann@googlemail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
capchild/capture_ifinfo.c
caputils/capture-wpcap.c

index 30cb7d1b0ea3afe7af4233f61fdbc21d042fe52c..3a25f2fa227fc2c091cf6a52cdfb7a52b8fb333d 100644 (file)
@@ -139,7 +139,7 @@ capture_interface_list(int *err, char **err_str, void (*update_cb)(void))
         }
         g_free(secondary_msg);
         *err = CANT_GET_INTERFACE_LIST;
-        return NULL;
+        return if_list;
     }
 
     /* Split our lines */
index 33422765699f4c0b22b09adaf8db1bf60ff6d720..87262dcfa95fa56060b6f076a3418496af4e718f 100644 (file)
@@ -553,9 +553,7 @@ pcap_datalink_name_to_val(const char *name)
 {
        int i;
 
-       g_assert(has_wpcap);
-
-       if (p_pcap_datalink_name_to_val != NULL)
+       if (has_wpcap && (p_pcap_datalink_name_to_val != NULL))
                return p_pcap_datalink_name_to_val(name);
        else {
                /*
@@ -605,9 +603,7 @@ pcap_datalink_val_to_name(int dlt)
 {
        int i;
 
-       g_assert(has_wpcap);
-
-       if (p_pcap_datalink_val_to_name != NULL)
+       if (has_wpcap && (p_pcap_datalink_val_to_name != NULL))
                return p_pcap_datalink_val_to_name(dlt);
        else {
                /*
@@ -628,9 +624,7 @@ pcap_datalink_val_to_description(int dlt)
 {
        int i;
 
-       g_assert(has_wpcap);
-
-       if (p_pcap_datalink_val_to_description != NULL)
+       if (has_wpcap && (p_pcap_datalink_val_to_description != NULL))
                return p_pcap_datalink_val_to_description(dlt);
        else {
                /*