aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2012-02-21 17:07:57 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2012-02-21 17:07:57 +0000
commitacb9414db942b3ca0c584646fbef137e538f3ed4 (patch)
tree1e3e560b0e9653a03f2a5e6fb531b4025acbf6d2 /tshark.c
parent660a348df1c4c0bf61ecc6531af95a7129c75892 (diff)
This should fix the buildbots...
The problem was that when reading a .pcap file, we don't have any IDBs. If reqested to write out an pcapng file, we (now) build a dummy IDB which uses the file's encapsulation as the interface encapsulation. Therefore it can't be per=packet. We need to fix this by using wtap_dump_open_ng()... svn path=/trunk/; revision=41122
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tshark.c b/tshark.c
index a38adc8109..08f8956448 100644
--- a/tshark.c
+++ b/tshark.c
@@ -2693,6 +2693,14 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type,
/* Snapshot length of input file not known. */
snapshot_length = WTAP_MAX_PACKET_SIZE;
}
+ /*
+ * XXX
+ * As long as we don't use wtap_dump_open_ng(), we can't use
+ * WTAP_ENCAP_PER_PACKET since there is no way to write out
+ * an IDB.
+ * So overwrite the above assignment for now!
+ */
+ linktype = wtap_file_encap(cf->wth);
pdh = wtap_dump_open(save_file, out_file_type, linktype, snapshot_length,
FALSE /* compressed */, &err);