diff options
author | Anders <anders.broman@ericsson.com> | 2017-06-26 16:42:06 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-07-05 12:59:12 +0000 |
commit | c5f296562f630d6cb8a982a28d079c4ade0817c3 (patch) | |
tree | e8564f6307f1ab0e22733eddbeefcebe80e0565b /ui/iface_lists.c | |
parent | 9ff673d3e85590141a6f0e33c9521de91512094d (diff) |
iface_lists: do not drop named pipes from interfaces list
(Named) pipes like "/tmp/fifo" or "-" have if_type == IF_WIRED instead
of IF_PIPE. Always try to add such interfaces such that "wireshark -i
/tmp/fifo" shows a "/tmp/fifo" item in the interfaces list.
Note that if an interface is really gone (like a disconnected USB
Ethernet device), then this could result in stale items in the list.
Ping-Bug: 13865
Fixes: v2.3.0rc0-2812-g40a5fb567a ("Restore interface selection after interface refresh")
Change-Id: Id05c65df332490a5bb789e4d6ca6404358edc3ec
Reviewed-on: https://code.wireshark.org/review/22407
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/iface_lists.c')
-rw-r--r-- | ui/iface_lists.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/ui/iface_lists.c b/ui/iface_lists.c index 5b36104050..dddecf4d27 100644 --- a/ui/iface_lists.c +++ b/ui/iface_lists.c @@ -344,13 +344,6 @@ scan_local_interfaces(void (*update_cb)(void)) for (j = 0; j < global_capture_opts.ifaces->len; j++) { interface_opts = g_array_index(global_capture_opts.ifaces, interface_options, j); - /* Skip non-pipes (like Ethernet, Wi-Fi, ...). */ - if (interface_opts.if_type != IF_PIPE && interface_opts.if_type != IF_STDIN) { - /* Note: the interface options are not destroyed for these - * interfaces in case it is briefly removed and re-added. */ - continue; - } - found = FALSE; for (i = 0; i < (int)global_capture_opts.all_ifaces->len; i++) { device = g_array_index(global_capture_opts.all_ifaces, interface_t, i); @@ -367,8 +360,7 @@ scan_local_interfaces(void (*update_cb)(void)) g_strdup(device.name); device.hidden = FALSE; device.selected = TRUE; - /* XXX shouldn't this be interface_opts.if_type (for IF_STDIN)? */ - device.type = IF_PIPE; + device.type = interface_opts.if_type; #ifdef CAN_SET_CAPTURE_BUFFER_SIZE device.buffer = interface_opts.buffer_size; #endif |