diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-06-03 10:14:39 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-06-03 17:15:17 +0000 |
commit | 2814e3c9cd4d9393231a746b4ef1bb1e6b7d95c9 (patch) | |
tree | 99288e1365f2d48220a1d40d8b8a2426f9db0c91 /capchild | |
parent | 8e1cd0453c787d72026e5a0193a3d3992d50226e (diff) |
If has_snaplen isn't set, don't set the snapshot length with pcap_create()/pcap_activate().
Just let libpcap pick the snapshot length; that way, for link-layer
types that need a really large snapshot length, such as D-Bus (which
requires 128MB for the largest messages), it can pick that, but can
otherwise pick something that doesn't require as much memory, e.g.
256KB.
For pcap_open_live() and pcap_open(), which don't have a way of saying
"give me what's appropriate", pick 256KB.
Change-Id: Idef5694f7dfa85eaf3a61d6ca7a17d263c417431
Reviewed-on: https://code.wireshark.org/review/21917
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'capchild')
-rw-r--r-- | capchild/capture_sync.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/capchild/capture_sync.c b/capchild/capture_sync.c index 57c2c86b8e..6dc0fcb84a 100644 --- a/capchild/capture_sync.c +++ b/capchild/capture_sync.c @@ -343,7 +343,7 @@ sync_pipe_start(capture_options *capture_opts, capture_session *cap_session, inf argv = sync_pipe_add_arg(argv, &argc, "-f"); argv = sync_pipe_add_arg(argv, &argc, interface_opts.cfilter); } - if (interface_opts.snaplen != WTAP_MAX_PACKET_SIZE) { + if (interface_opts.has_snaplen) { argv = sync_pipe_add_arg(argv, &argc, "-s"); g_snprintf(ssnap, ARGV_NUMBER_LEN, "%d", interface_opts.snaplen); argv = sync_pipe_add_arg(argv, &argc, ssnap); |