aboutsummaryrefslogtreecommitdiffstats
path: root/packet-igmp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-03-04 06:47:10 +0000
committerGuy Harris <guy@alum.mit.edu>2003-03-04 06:47:10 +0000
commit9db95664d104089e059e1110bd4936cb8375ff26 (patch)
treead09573b7494a677e409713fff80f9bed96d8553 /packet-igmp.c
parent9a57223addead8c42ff2c9b98c88aa68d5f670fe (diff)
When deciding whether we have enough data in a lower-level packet to
attempt reassembly of a higher-level packet that includes the lower-level packet, use "tvb_bytes_exist()" to check whether all the data that's to be included in the reassembly is available, rather than by checking whether the packet is short. Add some checks of that sort that were missing. Use the reported length of the packet when doing reassembly. Make the "iphdrlen" field of a "packet_info" structure be the length of the IP header in bytes, not in 4-byte words. svn path=/trunk/; revision=7274
Diffstat (limited to 'packet-igmp.c')
-rw-r--r--packet-igmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/packet-igmp.c b/packet-igmp.c
index 45599d95ca..756ab46661 100644
--- a/packet-igmp.c
+++ b/packet-igmp.c
@@ -1,7 +1,7 @@
/* packet-igmp.c 2001 Ronnie Sahlberg <See AUTHORS for email>
* Routines for IGMP packet disassembly
*
- * $Id: packet-igmp.c,v 1.21 2002/08/28 21:00:17 jmayer Exp $
+ * $Id: packet-igmp.c,v 1.22 2003/03/04 06:47:09 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -804,7 +804,7 @@ dissect_igmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
switch (type) {
case IGMP_V1_HOST_MEMBERSHIP_QUERY: /* 0x11 v1/v2/v3 */
- if ( (pinfo->iplen-pinfo->iphdrlen*4)>=12 ) {
+ if ( (pinfo->iplen-pinfo->iphdrlen)>=12 ) {
/* version 3 */
offset = dissect_igmp_v3_query(tvb, pinfo, tree, type, offset);
} else {
@@ -867,7 +867,7 @@ dissect_igmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
break;
case IGMP_TYPE_0x25:
- if ( (pinfo->iplen-pinfo->iphdrlen*4)>=8 ) {
+ if ( (pinfo->iplen-pinfo->iphdrlen)>=8 ) {
/* if len of igmp packet>=8 we assume it is MSNIP */
offset = dissect_msnip(tvb, pinfo, parent_tree, offset);
} else {