From ae130f114cd61443c8c93e1c9280e027726a0235 Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Fri, 23 Oct 2015 10:58:54 -0400 Subject: [PATCH] 802.1ah: call subdissectors even when we have no tree. Otherwise none of the subdissectors are called on the first pass which means none of their analysis (which is generally done on the first pass) is going to work. Bug: 11629 Change-Id: I6fe8d0692e5cf6f5b5fa099d31a91d01cc5c7c68 Reviewed-on: https://code.wireshark.org/review/11226 Petri-Dish: Jeff Morriss Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-ieee8021ah.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/epan/dissectors/packet-ieee8021ah.c b/epan/dissectors/packet-ieee8021ah.c index 7a41e3088e..a10a96827b 100644 --- a/epan/dissectors/packet-ieee8021ah.c +++ b/epan/dissectors/packet-ieee8021ah.c @@ -299,10 +299,9 @@ void dissect_ieee8021ah(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_tree *ptree; + proto_item *pi; guint32 tci; int proto_tree_index; - proto_tree *volatile ieee8021ah_tree; /* set tree index */ @@ -319,14 +318,13 @@ dissect_ieee8021ah(tvbuff_t *tvb, packet_info *pinfo, (tci >> 29), ((tci >> 28) & 1), ((tci >> 27) & 1), ((tci >> 26) & 1), ((tci >> 24) & 3), (tci & 0x00FFFFFF)); - /* create the protocol tree */ - ieee8021ah_tree = NULL; - - if (tree) { - ptree = proto_tree_add_item(tree, proto_tree_index, tvb, 0, IEEE8021AH_LEN, ENC_NA); - ieee8021ah_tree = proto_item_add_subtree(ptree, ett_ieee8021ah); + pi = proto_tree_add_item(tree, proto_tree_index, tvb, 0, IEEE8021AH_LEN, ENC_NA); + ieee8021ah_tree = proto_item_add_subtree(pi, ett_ieee8021ah); + if (ieee8021ah_tree) { dissect_ieee8021ah_common(tvb, pinfo, ieee8021ah_tree, tree, proto_tree_index); + } else { + dissect_ieee8021ah_common(tvb, pinfo, tree, NULL, proto_tree_index); } } -- 2.34.1