aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-eth.c
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2007-09-28 05:50:19 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2007-09-28 05:50:19 +0000
commite1777c1cd866de713f18cfbd9b38e15bd829f91f (patch)
treebdcaf89fad02ab3a977909b5309147f6c2ae9e01 /epan/dissectors/packet-eth.c
parent05ddc6fc34f272ec5e1f2218e90ba0a3aef012fe (diff)
queue the ip/eth headers for tapping before calling any subdissectors
so that they can be tapped even if the subdissectors cause an exception this fixes bug 1527 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23004 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-eth.c')
-rw-r--r--epan/dissectors/packet-eth.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/epan/dissectors/packet-eth.c b/epan/dissectors/packet-eth.c
index db4554dbb9..c604b2164d 100644
--- a/epan/dissectors/packet-eth.c
+++ b/epan/dissectors/packet-eth.c
@@ -208,6 +208,8 @@ dissect_eth_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
ehdr->type = tvb_get_ntohs(tvb, 12);
+ tap_queue_packet(eth_tap, pinfo, ehdr);
+
/*
* In case the packet is a non-Ethernet packet inside
* Ethernet framing, allow heuristic dissectors to take
@@ -215,7 +217,7 @@ dissect_eth_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
* Ethernet packet.
*/
if (dissector_try_heuristic(heur_subdissector_list, tvb, pinfo, parent_tree))
- goto end_of_eth;
+ return;
if (ehdr->type <= IEEE_802_3_MAX_LEN) {
/* Oh, yuck. Cisco ISL frames require special interpretation of the
@@ -229,7 +231,7 @@ dissect_eth_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
tvb_get_guint8(tvb, 3) == 0x00 &&
tvb_get_guint8(tvb, 4) == 0x00 ) {
dissect_isl(tvb, pinfo, parent_tree, fcs_len);
- goto end_of_eth;
+ return;
}
}
@@ -311,7 +313,7 @@ dissect_eth_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
if ((dst_addr[0] == 'i') || (dst_addr[0] == 'I') ||
(dst_addr[0] == 'o') || (dst_addr[0] == 'O')) {
call_dissector(fw1_handle, tvb, pinfo, parent_tree);
- goto end_of_eth;
+ return;
}
}
@@ -344,10 +346,6 @@ dissect_eth_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
ethertype(ehdr->type, tvb, ETH_HEADER_SIZE, pinfo, parent_tree, fh_tree, hf_eth_type,
hf_eth_trailer, fcs_len);
}
-
-end_of_eth:
- tap_queue_packet(eth_tap, pinfo, ehdr);
- return;
}
/*