diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-12-17 00:07:49 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-12-17 01:04:26 +0000 |
commit | 8cb03d57a600bc092fd5670f37fb990784fffd96 (patch) | |
tree | 81655feb022cee8ab63b017bc02d47927c3b6dc6 /epan/dissectors/packet-vlan.c | |
parent | b55d1b5e1f95defec4d624f8378a5d824917128d (diff) |
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 <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-vlan.c')
-rw-r--r-- | epan/dissectors/packet-vlan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-vlan.c b/epan/dissectors/packet-vlan.c index 061840f488..6f65835825 100644 --- a/epan/dissectors/packet-vlan.c +++ b/epan/dissectors/packet-vlan.c @@ -257,6 +257,8 @@ proto_reg_handoff_vlan(void) if (!prefs_initialized) { dissector_add_uint("ethertype", ETHERTYPE_VLAN, vlan_handle); + register_capture_dissector("ethertype", ETHERTYPE_VLAN, capture_vlan, hfi_vlan->id); + prefs_initialized = TRUE; } else @@ -268,7 +270,6 @@ proto_reg_handoff_vlan(void) ethertype_handle = find_dissector("ethertype"); dissector_add_uint("ethertype", q_in_q_ethertype, vlan_handle); - register_capture_dissector("ethertype", ETHERTYPE_VLAN, capture_vlan, hfi_vlan->id); } /* |