aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2016-01-29 10:59:18 +0100
committerJaap Keuter <jaap.keuter@xs4all.nl>2016-02-01 16:38:21 +0000
commit8e5272a969da95f343fb658fb5a05e449f28ecbd (patch)
tree7b8d0c45226dd6eadd53ce612c6e9c0267831c5e
parent98fc6c6cd198ffc0f99e805f0b3b4711195227cf (diff)
IP: Don't check length if in a ICMP error packet
Change-Id: I5fd81aec13655b9c53df9f0002441c3afc51c6e9 Reviewed-on: https://code.wireshark.org/review/13597 Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Jaap Keuter <jaap.keuter@xs4all.nl>
-rw-r--r--epan/dissectors/packet-ip.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c
index 3d67c51def..f6afb88425 100644
--- a/epan/dissectors/packet-ip.c
+++ b/epan/dissectors/packet-ip.c
@@ -2129,11 +2129,13 @@ dissect_ip_v4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
if (iph->ip_len > tvb_reported_length(tvb)) {
/*
* Length runs past the data we're given.
- * Note that.
+ * Note that if not in a ICMP error packet.
*/
- expert_add_info_format(pinfo, tf, &ei_ip_bogus_ip_length,
- "IPv4 total length exceeds packet length (%u bytes)",
- tvb_reported_length(tvb));
+ if (!pinfo->flags.in_error_pkt) {
+ expert_add_info_format(pinfo, tf, &ei_ip_bogus_ip_length,
+ "IPv4 total length exceeds packet length (%u bytes)",
+ tvb_reported_length(tvb));
+ }
} else {
/*
* Now that we know that the total length of this IP datagram isn't