From e41201cde4dcf28c8e22433bd363bf1133f31aa1 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Mon, 26 Dec 2016 08:04:12 -0500 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- plugins/mate/packet-mate.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins/mate') 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); -- cgit v1.2.1