diff options
Diffstat (limited to 'packet-clnp.c')
-rw-r--r-- | packet-clnp.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/packet-clnp.c b/packet-clnp.c index b16c097149..b1594a6751 100644 --- a/packet-clnp.c +++ b/packet-clnp.c @@ -1,7 +1,7 @@ /* packet-clnp.c * Routines for ISO/OSI network and transport protocol packet disassembly * - * $Id: packet-clnp.c,v 1.34 2001/09/27 10:35:40 guy Exp $ + * $Id: packet-clnp.c,v 1.35 2001/10/01 08:29:34 guy Exp $ * Laurent Deniel <deniel@worldnet.fr> * Ralf Schneider <Ralf.Schneider@t-online.de> * @@ -1592,6 +1592,7 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) address save_net_dst; address save_src; address save_dst; + gboolean save_in_error_pkt; fragment_data *fd_head; tvbuff_t *volatile next_tvb; packet_info save_pi; @@ -2022,10 +2023,20 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) save_src = pinfo->src; save_dst = pinfo->dst; + /* Save the current value of the "we're inside an error packet" + flag, and set that flag; subdissectors may treat packets + that are the payload of error packets differently from + "real" packets. */ + save_in_error_pkt = pinfo->in_error_pkt; + pinfo->in_error_pkt = TRUE; + /* Dissect the contained packet. Catch ReportedBoundsError, and do nothing if we see it, because it's not an error if the contained packet is short; - there's no guarantee that all of it was included. */ + there's no guarantee that all of it was included. + + XXX - should catch BoundsError, and re-throw it after cleaning + up. */ ti = proto_tree_add_text(clnp_tree, tvb, offset, next_length, "Discarded PDU"); discpdu_tree = proto_item_add_subtree(ti, ett_clnp_disc_pdu); @@ -2037,6 +2048,9 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } ENDTRY; + /* Restore the "we're inside an error packet" flag. */ + pinfo->in_error_pkt = save_in_error_pkt; + /* Restore the addresses. */ pinfo->dl_src = save_dl_src; pinfo->dl_dst = save_dl_dst; |