aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-12-26 08:04:12 -0500
committerMichael Mann <mmann78@netscape.net>2016-12-26 15:51:51 +0000
commite41201cde4dcf28c8e22433bd363bf1133f31aa1 (patch)
treef9924b6fd8c236b8a0f1d3db1df980188f910d17
parent730b2ed14ce4e1acb9b9f37f96ff1a2c08328c83 (diff)
Don't claim packet as MATE if there is no MATE configuration
This prevents MATE from (falsely) being included in the list of protocols for any given frame. Change-Id: I9ffdfb52cf31dfda89b674a41bcc0992e17de5e8 Reviewed-on: https://code.wireshark.org/review/19432 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--plugins/mate/packet-mate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mate/packet-mate.c b/plugins/mate/packet-mate.c
index 81efe83e62..047ebae889 100644
--- a/plugins/mate/packet-mate.c
+++ b/plugins/mate/packet-mate.c
@@ -302,7 +302,12 @@ mate_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
mate_pdu* pdus;
proto_tree *mate_t;
- if ( ! mc || ! tree )
+ /* If there is no MATE configuration, don't claim the packet */
+ if ( mc == NULL)
+ return 0;
+
+ /* There is a MATE configuration, just no tree, so there's nothing to do */
+ if ( tree == NULL)
return tvb_captured_length(tvb);
mate_analyze_frame(pinfo,tree);