diff options
author | tuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-06-07 12:23:15 +0000 |
---|---|---|
committer | tuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-06-07 12:23:15 +0000 |
commit | 2dcdb962a4f84da951feb452c18500cc5bc80ad5 (patch) | |
tree | 79058ad11200a0a150325c5d5c99a637cbbc58b3 /dumpcap.c | |
parent | ffffcdda4996d0ca508f8160a8dc8bd99a71dc31 (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.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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; |