802.1ah: call subdissectors even when we have no tree.
authorJeff Morriss <jeff.morriss.ws@gmail.com>
Fri, 23 Oct 2015 14:58:54 +0000 (10:58 -0400)
committerMichael Mann <mmann78@netscape.net>
Sat, 24 Oct 2015 00:30:44 +0000 (00:30 +0000)
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 <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
epan/dissectors/packet-ieee8021ah.c

index 7a41e3088e3ade3412c6ee325da29d56cdd290d0..a10a96827bc2506db51f288e61f267b49ba95ff3 100644 (file)
@@ -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);
     }
 }