aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Lars Völker <lars.voelker@technica-engineering.de>2022-10-12 17:51:50 +0200
committerAndersBroman <a.broman58@gmail.com>2022-10-13 14:47:12 +0000
commit883bc6ef290eb98020601b8409bc125ee98c8dce (patch)
tree033616141e8985f2b31e7a2c821ef190fe914f62
parent9891a791379e248f7de48e97448f38217fb7ff49 (diff)
TECMP: improve FCS and Padding detection for Ethernet
This patch fixes some bugs that occur with padded Ethernet frames or Ethernet frames with FCS present.
-rw-r--r--epan/dissectors/packet-tecmp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/epan/dissectors/packet-tecmp.c b/epan/dissectors/packet-tecmp.c
index ec79790331..e167159e60 100644
--- a/epan/dissectors/packet-tecmp.c
+++ b/epan/dissectors/packet-tecmp.c
@@ -1683,13 +1683,21 @@ dissect_tecmp_log_or_replay_stream(tvbuff_t *tvb, packet_info *pinfo, proto_tree
break;
case TECMP_DATA_TYPE_ETH:
+ {
/* resetting VLAN count since this is another embedded Ethernet packet. */
p_set_proto_depth(pinfo, proto_vlan, 0);
+
+ gint len_saved = pinfo->fd->pkt_len;
+ pinfo->fd->pkt_len = length;
+
if (show_ethernet_in_tecmp_tree) {
call_dissector(eth_handle, sub_tvb, pinfo, tecmp_tree);
} else {
call_dissector(eth_handle, sub_tvb, pinfo, tree);
}
+
+ pinfo->fd->pkt_len = len_saved;
+ }
break;
default:
@@ -2306,7 +2314,7 @@ proto_register_tecmp_payload(void) {
void
proto_reg_handoff_tecmp_payload(void) {
- eth_handle = find_dissector("eth_maybefcs");
+ eth_handle = find_dissector("eth_withfcs");
proto_vlan = proto_get_id_by_filter_name("vlan");
}