From a277a520fc6d7e4511a122b10659ff533512d539 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 2 Jul 2018 19:32:20 -0700 Subject: [PATCH] The "Ethernet offset" is 16 bits in the file; make it so in the pseudo-header. This should squelch warnings from Ida7b98af8c44a52ddac2c4ab0702db2519a0c4af. Change-Id: I6803001981c63ddf76a735341ab2cc8dccdb8ab0 Reviewed-on: https://code.wireshark.org/review/28573 Reviewed-by: Guy Harris --- epan/dissectors/packet-nstrace.c | 4 +--- wiretap/wtap.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/epan/dissectors/packet-nstrace.c b/epan/dissectors/packet-nstrace.c index 4519dbadff..6cf0faecf8 100644 --- a/epan/dissectors/packet-nstrace.c +++ b/epan/dissectors/packet-nstrace.c @@ -465,7 +465,6 @@ dissect_nstrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data proto_item *ti; struct nstr_phdr *pnstr = &(pinfo->pseudo_header->nstr); tvbuff_t *next_tvb_eth_client; - guint8 offset; guint8 src_vmname_len = 0, dst_vmname_len = 0; guint8 variable_ns_len = 0; guint32 vlan; @@ -603,8 +602,7 @@ dissect_nstrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data if(pnstr->rec_type != NSPR_HEADER_VERSION350){ /* Dissect as Ethernet */ - offset = pnstr->eth_offset; - next_tvb_eth_client = tvb_new_subset_remaining(tvb, offset); + next_tvb_eth_client = tvb_new_subset_remaining(tvb, pnstr->eth_offset); call_dissector(eth_withoutfcs_handle, next_tvb_eth_client, pinfo, tree); } diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 3822b1b432..ceedb762a8 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -1112,7 +1112,7 @@ struct nstr_phdr { guint8 nicno_len; guint8 dir_offset; guint8 dir_len; - guint8 eth_offset; + guint16 eth_offset; guint8 pcb_offset; guint8 l_pcb_offset; guint8 rec_type;