aboutsummaryrefslogtreecommitdiffstats
path: root/dumpcap.c
diff options
context:
space:
mode:
authortuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>2011-06-07 12:23:15 +0000
committertuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>2011-06-07 12:23:15 +0000
commit2dcdb962a4f84da951feb452c18500cc5bc80ad5 (patch)
tree79058ad11200a0a150325c5d5c99a637cbbc58b3 /dumpcap.c
parentffffcdda4996d0ca508f8160a8dc8bd99a71dc31 (diff)
When doing remote capturing using WinPCap, dumpcap crashes inside the WinPCap
library when no capture filter is used. Then cfilter is NULL and capture_loop_init_filter() does not call compile_capture_filter() and pcap_setfilter(). Providing an empty string instead of NULL works around the problem. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37588 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'dumpcap.c')
-rw-r--r--dumpcap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/dumpcap.c b/dumpcap.c
index 2ca9becbb6..f6268c7c66 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -3068,9 +3068,14 @@ capture_loop_start(capture_options *capture_opts, gboolean *stats_known, struct
pcap_opts = g_array_index(global_ld.pcaps, pcap_options *, i);
interface_opts = g_array_index(capture_opts->ifaces, interface_options, i);
/* init the input filter from the network interface (capture pipe will do nothing) */
+ /*
+ * When remote capturing WinPCap crashes when the capture filter
+ * is NULL. This might be a bug in WPCap. Therefore we provide an emtpy
+ * string.
+ */
switch (capture_loop_init_filter(pcap_opts->pcap_h, pcap_opts->from_cap_pipe,
interface_opts.name,
- interface_opts.cfilter)) {
+ interface_opts.cfilter?interface_opts.cfilter:"")) {
case INITFILTER_NO_ERROR:
break;