aboutsummaryrefslogtreecommitdiffstats
path: root/capchild/capture_ifinfo.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-02-26 16:35:17 -0800
committerGuy Harris <guy@alum.mit.edu>2016-02-27 00:37:22 +0000
commit60f87ca919a6bfedfdb8b4728f7f221eb6b8af15 (patch)
tree651e700e84357387134a0dd235155b60f18411f8 /capchild/capture_ifinfo.c
parenta7c44b79732cf7823906fd7f6d880f578247d209 (diff)
Put the extcap interfaces at the *end* of the interface list.
The list should start with the native local interfaces, as returned by pcap, so that we default to the interface pcap gives first, rather than to whatever extcap interface happens to be at the beginning. This also means that, if we're only calling extcap_interface_list() to regenerate our internal data structures, we don't bother allocating - and leaking! - a list of if_info structures. Change-Id: Ida651b5b081883f118a300b9f57403f2dc5c4363 Ping-Bug: 12183 Reviewed-on: https://code.wireshark.org/review/14187 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'capchild/capture_ifinfo.c')
-rw-r--r--capchild/capture_ifinfo.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/capchild/capture_ifinfo.c b/capchild/capture_ifinfo.c
index 3753ee2684..5c4f299415 100644
--- a/capchild/capture_ifinfo.c
+++ b/capchild/capture_ifinfo.c
@@ -106,10 +106,6 @@ capture_interface_list(int *err, char **err_str, void (*update_cb)(void))
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_MESSAGE, "Capture Interface List ...");
*err = 0;
-#ifdef HAVE_EXTCAP
- g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_MESSAGE, "Loading External Capture Interface List ...");
- if_list = extcap_interface_list(err_str);
-#endif
/* Try to get our interface list */
ret = sync_interface_list_open(&data, &primary_msg, &secondary_msg, update_cb);
@@ -200,6 +196,13 @@ capture_interface_list(int *err, char **err_str, void (*update_cb)(void))
append_remote_list(if_list);
}
#endif
+
+#ifdef HAVE_EXTCAP
+ /* Add the extcap interfaces after the native and remote interfaces */
+ g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_MESSAGE, "Loading External Capture Interface List ...");
+ extcap_interface_list(&if_list, err_str);
+#endif
+
return if_list;
}