aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/file-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/file-file.c')
-rw-r--r--epan/dissectors/file-file.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/dissectors/file-file.c b/epan/dissectors/file-file.c
index f336494f5c..fb5be48088 100644
--- a/epan/dissectors/file-file.c
+++ b/epan/dissectors/file-file.c
@@ -121,7 +121,8 @@ dissect_file_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
fh_tree = proto_item_add_subtree(ti, ett_file);
- proto_tree_add_int(fh_tree, hf_file_ftap_encap, tvb, 0, 0, pinfo->phdr->pkt_encap);
+ if (pinfo->rec->rec_type == REC_TYPE_PACKET)
+ proto_tree_add_int(fh_tree, hf_file_ftap_encap, tvb, 0, 0, pinfo->rec->rec_header.packet_header.pkt_encap);
proto_tree_add_uint(fh_tree, hf_file_record_number, tvb, 0, 0, pinfo->num);
@@ -177,12 +178,13 @@ dissect_file_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
*/
__try {
#endif
- if (!dissector_try_uint(file_encap_dissector_table, pinfo->phdr->pkt_encap,
+ if (pinfo->rec->rec_type != REC_TYPE_PACKET ||
+ !dissector_try_uint(file_encap_dissector_table, pinfo->rec->rec_header.packet_header.pkt_encap,
tvb, pinfo, parent_tree)) {
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
col_add_fstr(pinfo->cinfo, COL_INFO, "FTAP_ENCAP = %d",
- pinfo->phdr->pkt_encap);
+ pinfo->rec->rec_header.packet_header.pkt_encap);
call_data_dissector(tvb, pinfo, parent_tree);
}
#ifdef _MSC_VER