diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-12-13 02:43:32 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-12-13 02:43:32 +0000 |
commit | 1eaedf15b5d29e5475c722d8b815d43b2dadd7c0 (patch) | |
tree | 5b7a5fc4281919fe1cdb521f4780e33ba88cb279 | |
parent | 677a1c6dc236c75344f3410ac740ef3b49ff8663 (diff) | |
download | wireshark-1eaedf15b5d29e5475c722d8b815d43b2dadd7c0.tar.gz wireshark-1eaedf15b5d29e5475c722d8b815d43b2dadd7c0.tar.bz2 wireshark-1eaedf15b5d29e5475c722d8b815d43b2dadd7c0.zip |
Don't check the checksum of ICMP datagrams that are fragmented
(unlikely, perhaps even forbidden, but not impossible).
svn path=/trunk/; revision=2752
-rw-r--r-- | packet-ip.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/packet-ip.c b/packet-ip.c index 366c1312ff..b799a32db5 100644 --- a/packet-ip.c +++ b/packet-ip.c @@ -1,7 +1,7 @@ /* packet-ip.c * Routines for IP and miscellaneous IP protocol packet disassembly * - * $Id: packet-ip.c,v 1.110 2000/12/13 02:24:21 guy Exp $ + * $Id: packet-ip.c,v 1.111 2000/12/13 02:43:32 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -1083,10 +1083,9 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "Code: %u %s", icmp_code, code_str); - if (length >= reported_length) { - /* The packet isn't truncated, so we can checksum it. - XXX - we have to check whether this is part of a fragmented - IP datagram, too.... */ + if (!pinfo->fragmented && length >= reported_length) { + /* The packet isn't part of a fragmented datagarm and isn't + truncated, so we can checksum it. */ computed_cksum = ip_checksum(tvb_get_ptr(tvb, 0, reported_length), reported_length); |