FCOE: (Pre-T11) Help Ethernet dissector guess about Ethernet FCS

The pre-T11 (pre August 2007) version of FCOE has a frame length, so it's
possible to set the length in order to help the Ethernet dissector determine
if a capture includes the Ethernet FCS, like how other dissectors do it.
This isn't possible in the standardized version, since the length field
was removed. Closes #4594.
This commit is contained in:
John Thacker 2020-08-27 10:23:46 -04:00
parent d24674c4ae
commit fb86f83949
1 changed files with 4 additions and 0 deletions

View File

@ -130,6 +130,10 @@ dissect_fcoe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
ver = "pre-T11 ";
if (version != 0)
ver = wmem_strdup_printf(wmem_packet_scope(), ver, "pre-T11 ver %d ", version);
/* Old format has a length field, so we can help the Ethernet dissector
* guess about the FCS; note this format does not pad after the EOF,
* so the trailer is only 5 octets, not 8. */
set_actual_length(tvb, header_len+frame_len+5);
} else {
frame_len = tvb_reported_length_remaining(tvb, 0) -
FCOE_HEADER_LEN - FCOE_TRAILER_LEN;