path: root/tshark.c
diff options
authorGuy Harris <guy@alum.mit.edu>2018-11-15 15:25:06 -0800
committerGuy Harris <guy@alum.mit.edu>2018-11-15 23:25:41 +0000
commitad2bc773d6c777290b2485de8a43350682c438a1 (patch)
tree0a2ffc89d7ded90dc1eba06867c83d61c4ea4850 /tshark.c
parentd631c17eee0ade675f6f4a0612ce0b127e44ee72 (diff)
Just pass on a snapshot length of 0 to the dumper.
It means "snapshot length unknown". For most file formats, the snapshot length isn't recorded (even for formats that support slicing - all they record is the on-the-network length, and length after slicing, for each packet), so it's ignored in the dumper. The one exception is pcap, which records it in the file header; if it's unknown, the pcap-writing code picks the maximum supported snapshot length for the file's link-layer header type. Change-Id: Ieda5dfe34c4bac63e43fdadeff31799ac3c908de Reviewed-on: https://code.wireshark.org/review/30657 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tshark.c')
1 files changed, 0 insertions, 6 deletions
diff --git a/tshark.c b/tshark.c
index d378ad72b3..e519387ce1 100644
--- a/tshark.c
+++ b/tshark.c
@@ -3107,12 +3107,6 @@ process_cap_file(capture_file *cf, char *save_file, int out_file_type,
if (save_file != NULL) {
/* Set up to write to the capture file. */
snapshot_length = wtap_snapshot_length(cf->provider.wth);
- if (snapshot_length == 0) {
- /* Snapshot length of input file not known. */
- snapshot_length = WTAP_MAX_PACKET_SIZE_STANDARD;
- }
- tshark_debug("tshark: snapshot_length = %d", snapshot_length);
wtap_dump_params_init(&ng_params, cf->provider.wth);
if (ng_params.idb_inf->interface_data->len > 1) {