forked from osmocom/wireshark
ERF: Fix Ethernet FCS detection and remove preference
Use eth_maybefcs instead of eth_withoutfcs. ERF_TYPE_ETH records almost always have FCS, but using maybe means the "Assume packets have FCS" is respected. Mark the erf_ethfcs preference as obsolete. It was being ignored. This was broken by Change 3670 which changed the ERF dissector to use a dissector table. Change-Id: I45cffdaed3890f8a0f505b2011be8c5204d9b2a6 Reviewed-on: https://code.wireshark.org/review/15360 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
d5031d5cf4
commit
f872bdf610
|
@ -275,8 +275,6 @@ typedef enum {
|
|||
static gint erf_aal5_type = ERF_AAL5_GUESS;
|
||||
static dissector_handle_t atm_untruncated_handle;
|
||||
|
||||
static gboolean erf_ethfcs = TRUE;
|
||||
|
||||
static dissector_handle_t sdh_handle;
|
||||
|
||||
/* ERF Header */
|
||||
|
@ -2964,10 +2962,11 @@ proto_register_erf(void)
|
|||
"Protocol encapsulated in ATM AAL5 packets",
|
||||
&erf_aal5_type, erf_aal5_options, FALSE);
|
||||
|
||||
prefs_register_bool_preference(erf_module, "ethfcs",
|
||||
"Ethernet packets have FCS",
|
||||
"Whether the FCS is present in Ethernet packets",
|
||||
&erf_ethfcs);
|
||||
/*
|
||||
* We just use eth_maybefcs now and respect the Ethernet preference.
|
||||
* ERF records usually have FCS.
|
||||
*/
|
||||
prefs_register_obsolete_preference(erf_module, "ethfcs");
|
||||
|
||||
erf_dissector_table = register_dissector_table("erf.types.type", "Type", proto_erf, FT_UINT8, BASE_DEC, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
|
||||
|
||||
|
|
|
@ -1038,7 +1038,7 @@ proto_register_eth(void)
|
|||
void
|
||||
proto_reg_handoff_eth(void)
|
||||
{
|
||||
dissector_handle_t eth_handle, eth_withoutfcs_handle;
|
||||
dissector_handle_t eth_handle, eth_withoutfcs_handle, eth_maybefcs_handle;
|
||||
|
||||
/* Get a handle for the Firewall-1 dissector. */
|
||||
fw1_handle = find_dissector_add_dependency("fw1", proto_eth);
|
||||
|
@ -1050,8 +1050,9 @@ proto_reg_handoff_eth(void)
|
|||
dissector_add_uint("wtap_encap", WTAP_ENCAP_ETHERNET, eth_handle);
|
||||
|
||||
eth_withoutfcs_handle = find_dissector("eth_withoutfcs");
|
||||
eth_maybefcs_handle = find_dissector("eth_maybefcs");
|
||||
dissector_add_uint("ethertype", ETHERTYPE_ETHBRIDGE, eth_withoutfcs_handle);
|
||||
dissector_add_uint("erf.types.type", ERF_TYPE_ETH, eth_withoutfcs_handle);
|
||||
dissector_add_uint("erf.types.type", ERF_TYPE_ETH, eth_maybefcs_handle);
|
||||
dissector_add_uint("chdlc.protocol", ETHERTYPE_ETHBRIDGE, eth_withoutfcs_handle);
|
||||
dissector_add_uint("gre.proto", ETHERTYPE_ETHBRIDGE, eth_withoutfcs_handle);
|
||||
dissector_add_uint("gre.proto", GRE_MIKROTIK_EOIP, eth_withoutfcs_handle);
|
||||
|
|
Loading…
Reference in New Issue