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 /plugins | |
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 'plugins')
-rw-r--r-- | plugins/docsis/packet-docsis.c | 2 | ||||
-rw-r--r-- | plugins/docsis/packet-macmgmt.c | 2 | ||||
-rw-r--r-- | plugins/ethercat/packet-ethercat-frame.c | 2 | ||||
-rw-r--r-- | plugins/wimax/mac_mgmt_msg_decoder.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/plugins/docsis/packet-docsis.c b/plugins/docsis/packet-docsis.c index 1df07a8588..6b548c5b55 100644 --- a/plugins/docsis/packet-docsis.c +++ b/plugins/docsis/packet-docsis.c @@ -789,7 +789,7 @@ proto_register_docsis (void) #if 0 docsis_dissector_table = register_dissector_table ("docsis", "DOCSIS Encapsulation Type", - FT_UINT8, BASE_DEC); + FT_UINT8, BASE_DEC, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE); #endif proto_docsis = proto_register_protocol ("DOCSIS 1.1", "DOCSIS", "docsis"); diff --git a/plugins/docsis/packet-macmgmt.c b/plugins/docsis/packet-macmgmt.c index a068135451..6680dfce23 100644 --- a/plugins/docsis/packet-macmgmt.c +++ b/plugins/docsis/packet-macmgmt.c @@ -258,7 +258,7 @@ proto_register_docsis_mgmt (void) docsis_mgmt_dissector_table = register_dissector_table ("docsis_mgmt", "DOCSIS Mac Management", - FT_UINT8, BASE_DEC); + FT_UINT8, BASE_DEC, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE); proto_docsis_mgmt = proto_register_protocol ("DOCSIS Mac Management", diff --git a/plugins/ethercat/packet-ethercat-frame.c b/plugins/ethercat/packet-ethercat-frame.c index 17b9d3de4a..7ecd0a27bf 100644 --- a/plugins/ethercat/packet-ethercat-frame.c +++ b/plugins/ethercat/packet-ethercat-frame.c @@ -139,7 +139,7 @@ void proto_register_ethercat_frame(void) /* Define a handle (ecatf.type) for sub dissectors that want to dissect the Ethercat frame ether type (E88A4) payload. */ ethercat_frame_dissector_table = register_dissector_table("ecatf.type", - "EtherCAT frame type", FT_UINT8, BASE_DEC); + "EtherCAT frame type", FT_UINT8, BASE_DEC, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE); } void proto_reg_handoff_ethercat_frame(void) diff --git a/plugins/wimax/mac_mgmt_msg_decoder.c b/plugins/wimax/mac_mgmt_msg_decoder.c index 12ebf8b7fd..937614b5bc 100644 --- a/plugins/wimax/mac_mgmt_msg_decoder.c +++ b/plugins/wimax/mac_mgmt_msg_decoder.c @@ -213,7 +213,7 @@ void proto_register_mac_mgmt_msg(void) expert_register_field_array(expert_mac_mgmt, ei, array_length(ei)); subdissector_message_table = register_dissector_table("wmx.mgmtmsg", - "WiMax MAC Management Message", FT_UINT8, BASE_DEC); + "WiMax MAC Management Message", FT_UINT8, BASE_DEC, DISSECTOR_TABLE_ALLOW_DUPLICATE); /* Register dissector by name */ register_dissector("wmx_mac_mgmt_msg_decoder", dissect_mac_mgmt_msg_decoder, |