diff options
author | Michael Mann <mmann78@netscape.net> | 2016-12-26 08:04:12 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-12-26 15:51:51 +0000 |
commit | e41201cde4dcf28c8e22433bd363bf1133f31aa1 (patch) | |
tree | f9924b6fd8c236b8a0f1d3db1df980188f910d17 /plugins | |
parent | 730b2ed14ce4e1acb9b9f37f96ff1a2c08328c83 (diff) | |
download | wireshark-e41201cde4dcf28c8e22433bd363bf1133f31aa1.tar.gz |
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>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mate/packet-mate.c | 7 |
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); |