aboutsummaryrefslogtreecommitdiffstats
path: root/packet-icmpv6.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-09-27 10:35:40 +0000
committerGuy Harris <guy@alum.mit.edu>2001-09-27 10:35:40 +0000
commit6395ce3749d69f85a6036c96e894f903b9464788 (patch)
tree9b9e176e9d37c2aa64bf1f7c568700480125a330 /packet-icmpv6.c
parent43cd2ff411bb10c7efb20e0e71eecb8756672133 (diff)
When dissecting an ICMP datagram that contains part of an IP datagram,
hand the (possibly-partial) IP datagram to the IP dissector, as we do for IPv6 datagrams inside ICMPv6 and CLNP datagrams inside CLNP ER PDUs. When dissecting IPv6 datagrams inside ICMPv6 and CLNP datagrams inside CLNP ER PDUs, catch the ReportedLengthError exception and ignore it, as they don't guarantee that all of the original PDU is present. svn path=/trunk/; revision=3960
Diffstat (limited to 'packet-icmpv6.c')
-rw-r--r--packet-icmpv6.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/packet-icmpv6.c b/packet-icmpv6.c
index 5bbc5e2b18..dc5ee6acc1 100644
--- a/packet-icmpv6.c
+++ b/packet-icmpv6.c
@@ -1,7 +1,7 @@
/* packet-icmpv6.c
* Routines for ICMPv6 packet disassembly
*
- * $Id: packet-icmpv6.c,v 1.51 2001/09/25 18:27:35 guy Exp $
+ * $Id: packet-icmpv6.c,v 1.52 2001/09/27 10:35:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -139,8 +139,17 @@ dissect_contained_icmpv6(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
save_src = pinfo->src;
save_dst = pinfo->dst;
- /* Dissect the contained packet. */
- call_dissector(ipv6_handle, next_tvb, pinfo, tree);
+ /* 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. */
+ TRY {
+ call_dissector(ipv6_handle, next_tvb, pinfo, tree);
+ }
+ CATCH(ReportedBoundsError) {
+ ; /* do nothing */
+ }
+ ENDTRY;
/* Restore the addresses. */
pinfo->dl_src = save_dl_src;