From 8cb03d57a600bc092fd5670f37fb990784fffd96 Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Thu, 17 Dec 2015 00:07:49 +0100 Subject: Capture dissectors must be registered only once at startup So ensure that register_capture_dissector() is not called again when changing a preference Bug: 11884 Change-Id: I18ce05e89b19f106470a8ec843062c115dae60db Reviewed-on: https://code.wireshark.org/review/12689 Reviewed-by: Pascal Quantin Petri-Dish: Pascal Quantin Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-ieee8021ah.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'epan/dissectors/packet-ieee8021ah.c') diff --git a/epan/dissectors/packet-ieee8021ah.c b/epan/dissectors/packet-ieee8021ah.c index e6769638ec..ab022d5338 100644 --- a/epan/dissectors/packet-ieee8021ah.c +++ b/epan/dissectors/packet-ieee8021ah.c @@ -431,6 +431,8 @@ proto_reg_handoff_ieee8021ah(void) proto_ieee8021ad); dissector_add_uint("ethertype", ETHERTYPE_IEEE_802_1AD, ieee8021ad_handle); ethertype_handle = find_dissector("ethertype"); + register_capture_dissector("ethertype", ETHERTYPE_IEEE_802_1AD, capture_ieee8021ah, proto_ieee8021ah); + register_capture_dissector("ethertype", ETHERTYPE_IEEE_802_1AH, capture_ieee8021ah, proto_ieee8021ah); prefs_initialized = TRUE; } @@ -440,9 +442,6 @@ proto_reg_handoff_ieee8021ah(void) old_ieee8021ah_ethertype = ieee8021ah_ethertype; dissector_add_uint("ethertype", ieee8021ah_ethertype, ieee8021ah_handle); - register_capture_dissector("ethertype", ETHERTYPE_IEEE_802_1AD, capture_ieee8021ah, proto_ieee8021ah); - register_capture_dissector("ethertype", ETHERTYPE_IEEE_802_1AH, capture_ieee8021ah, proto_ieee8021ah); - } /* -- cgit v1.2.3