aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2011-07-09 02:04:48 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2011-07-09 02:04:48 +0000
commitf93d3aeeb15cfd94c62aa88125eb06af52b71709 (patch)
tree5a2704443b9fd6ff0abff6301fc95f6e03ec2128 /epan
parent030ec9993923fcb264eee53168307233faf91f25 (diff)
Per README.developer, we must call subdissectors regardless of whether "tree"
is NULL or not. With this change, GRE-encapsulated packets (such as IP) should now appear in then endpoint and conversation lists. This was essentially the request made at Sharkfest '11. The actual request was for a "GRE" tab to be added, but that doesn't really make much sense to me. I believe this change should fulfill that request. svn path=/trunk/; revision=37945
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-gre.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gre.c b/epan/dissectors/packet-gre.c
index 0552c6029b..57609f0b6b 100644
--- a/epan/dissectors/packet-gre.c
+++ b/epan/dissectors/packet-gre.c
@@ -344,7 +344,13 @@ dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
- if (tree) {
+ /* Per README.developer, section 1.2, we must call subdissectors regardless
+ * of whether "tree" is NULL or not. That is done below using
+ * call_dissector(), but since the next_tvb must begin at the correct offset,
+ * it's easier and more readable to always enter this block in order to
+ * compute the correct offset to pass to tvb_new_subset_remaining().
+ */
+ if (1) {
ti = proto_tree_add_protocol_format(tree, proto_gre, tvb, offset, -1, "Generic Routing Encapsulation (%s)",
val_to_str(type, gre_typevals, "0x%04X - unknown"));
gre_tree = proto_item_add_subtree(ti, ett_gre);