diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-09-28 05:50:19 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-09-28 05:50:19 +0000 |
commit | 30b586ad61bbdccff66623f7b061b8624fefc1e4 (patch) | |
tree | bdcaf89fad02ab3a977909b5309147f6c2ae9e01 /epan/dissectors/packet-eth.c | |
parent | 69ddd8a77382beb9a2f3dc12d2767d01f6f18ccd (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
svn path=/trunk/; revision=23004
Diffstat (limited to 'epan/dissectors/packet-eth.c')
-rw-r--r-- | epan/dissectors/packet-eth.c | 12 |
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; } /* |