diff options
author | Michael Mann <mmann78@netscape.net> | 2015-10-29 09:23:55 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-04 12:39:40 +0000 |
commit | 74541a9596eead6647c592de9aa46797c2dffa84 (patch) | |
tree | 7962802ba44900541a93a77f2d4923e2d4daebf2 /epan/dissectors/packet-cip.c | |
parent | 0ccab3c0b54ce82a5e5036894194ab25c9ea18d4 (diff) |
Don't allow multiple registrations of a protocol in dissector tables.
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing.
The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not. It's just ENFORCED for Decode As.
Bug: 3949
Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127
Reviewed-on: https://code.wireshark.org/review/11405
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-cip.c')
-rw-r--r-- | epan/dissectors/packet-cip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-cip.c b/epan/dissectors/packet-cip.c index 8cac8f0299..038a2d532e 100644 --- a/epan/dissectors/packet-cip.c +++ b/epan/dissectors/packet-cip.c @@ -6891,9 +6891,9 @@ proto_register_cip(void) expert_register_field_array(expert_cip, ei, array_length(ei)); subdissector_class_table = register_dissector_table("cip.class.iface", - "CIP Class Interface Handle", FT_UINT32, BASE_HEX); + "CIP Class Interface Handle", FT_UINT32, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE); subdissector_symbol_table = register_dissector_table("cip.data_segment.iface", - "CIP Data Segment Interface Handle", FT_UINT32, BASE_HEX); + "CIP Data Segment Interface Handle", FT_UINT32, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE); /* Register the protocol name and description */ proto_cip_class_generic = proto_register_protocol("CIP Class Generic", |