diff options
author | Michael Tüxen <tuexen@fh-muenster.de> | 2011-06-07 12:23:15 +0000 |
---|---|---|
committer | Michael Tüxen <tuexen@fh-muenster.de> | 2011-06-07 12:23:15 +0000 |
commit | 71325b8ac2c1f678497641ea4277ce55500bcdbd (patch) | |
tree | 79058ad11200a0a150325c5d5c99a637cbbc58b3 /dumpcap.c | |
parent | 9164a7f892859b44deb19379f52e7d5dce93be50 (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.
svn path=/trunk/; revision=37588
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; |