/* packet-ieee8023.c
* Routine for dissecting 802.3 (as opposed to D/I/X Ethernet) packets.
*
- * $Id: packet-ieee8023.c,v 1.8 2004/02/21 00:22:16 guy Exp $
+ * $Id$
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
{
tvbuff_t *volatile next_tvb;
tvbuff_t *volatile trailer_tvb;
+ const char *saved_proto;
if (fh_tree)
proto_tree_add_uint(fh_tree, length_id, tvb, offset_after_length - 2, 2,
reported length of "next_tvb" was reduced by some dissector
before an exception was thrown, we can still put in an item
for the trailer. */
+ saved_proto = pinfo->current_proto;
TRY {
if (is_802_2)
call_dissector(llc_handle, next_tvb, pinfo, tree);
}
CATCH_ALL {
/* Well, somebody threw an exception other than BoundsError.
- Show the exception, and then drive on to show the trailer. */
+ Show the exception, and then drive on to show the trailer,
+ restoring the protocol value that was in effect before we
+ called the subdissector. */
show_exception(next_tvb, pinfo, tree, EXCEPT_CODE);
+ pinfo->current_proto = saved_proto;
}
ENDTRY;