aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-epon.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-01-17 20:08:17 -0800
committerGuy Harris <guy@alum.mit.edu>2016-01-18 04:15:16 +0000
commit8ec153f93816a302a325e40924f4e13383ad8eaf (patch)
tree630efb01c710f8fd81c69f4c54dfd09873ec26fe /epan/dissectors/packet-epon.c
parent5fe11fb75964d8e0d87fb73d99aa5f69066b9e8f (diff)
Have the "maybe an FCS" version of the Ethernet dissector take a data argument.
It's called from some places other than packet-frame.c, at least one of which currently can't call anything else (the ATM dissector, for VC-multiplexed bridged frames, where you don't know whether the frames include the FCS or not), so the frame's pseudo-data doesn't necessarily have the appropriate "FCS length" value. Have it explicitly check the data argument, and explicitly pass the appropriate value to it. Ping-Bug: 9933 Change-Id: I0c75f921d25d1e2b75e476c15ff9625205036b25 Reviewed-on: https://code.wireshark.org/review/13382 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-epon.c')
-rw-r--r--epan/dissectors/packet-epon.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/epan/dissectors/packet-epon.c b/epan/dissectors/packet-epon.c
index c808534212..1ba9bcb285 100644
--- a/epan/dissectors/packet-epon.c
+++ b/epan/dissectors/packet-epon.c
@@ -79,6 +79,7 @@ dissect_epon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint offset = 0;
guint dpoe_sec_byte;
gboolean dpoe_encrypted = FALSE;
+ struct eth_phdr eth;
/* Start_of_Packet delimiter (/S/) can either happen in byte 1 or byte 2,
* making the captured preamble either 7 or 6 bytes in length. If the
@@ -195,7 +196,12 @@ dissect_epon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
col_append_str(pinfo->cinfo, COL_INFO, " [ENCRYPTED]");
} else {
next_tvb = tvb_new_subset_remaining(tvb, 6+offset);
- call_dissector(eth_handle, next_tvb, pinfo, tree);
+ /*
+ * XXX - is it guaranteed whether the capture will, or won't, have
+ * an FCS?
+ */
+ eth.fcs_len = -1;
+ call_dissector_with_data(eth_handle, next_tvb, pinfo, tree, &eth);
}
return tvb_captured_length(tvb);