diff options
Diffstat (limited to 'epan/dissectors/packet-bgp.c')
-rw-r--r-- | epan/dissectors/packet-bgp.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/epan/dissectors/packet-bgp.c b/epan/dissectors/packet-bgp.c index 9e3fae02de..7d92bd7857 100644 --- a/epan/dissectors/packet-bgp.c +++ b/epan/dissectors/packet-bgp.c @@ -59,7 +59,7 @@ #include <epan/packet.h> #include <epan/addr_and_mask.h> -#include "packet-frame.h" +#include <epan/show_exception.h> #include <epan/afn.h> #include <epan/prefs.h> #include <epan/emem.h> @@ -3961,29 +3961,26 @@ dissect_bgp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* * Dissect the PDU. * - * Catch the ReportedBoundsError exception; if this particular message - * happens to get a ReportedBoundsError exception, that doesn't mean - * that we should stop dissecting PDUs within this frame or chunk of - * reassembled data. + * If it gets an error that means there's no point in + * dissecting any more PDUs, rethrow the exception in + * question. * - * If it gets a BoundsError, we can stop, as there's nothing more to - * see, so we just re-throw it. + * If it gets any other error, report it and continue, as that + * means that PDU got an error, but that doesn't mean we should + * stop dissecting PDUs within this frame or chunk of reassembled + * data. */ pd_save = pinfo->private_data; TRY { dissect_bgp_pdu(next_tvb, pinfo, tree, first); } - CATCH(BoundsError) { - RETHROW; - } - CATCH(ReportedBoundsError) { + CATCH_NONFATAL_ERRORS { /* Restore the private_data structure in case one of the * called dissectors modified it (and, due to the exception, * was unable to restore it). */ pinfo->private_data = pd_save; - - show_reported_bounds_error(tvb, pinfo, tree); + show_exception(tvb, pinfo, tree, EXCEPT_CODE, GET_MESSAGE); } ENDTRY; |