aboutsummaryrefslogtreecommitdiffstats
path: root/packet-igmp.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-03-04 06:47:10 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-03-04 06:47:10 +0000
commitec068df9b6ca1c118d49dfae95509334219f3e13 (patch)
treead09573b7494a677e409713fff80f9bed96d8553 /packet-igmp.c
parent329ff554fe6782092b361bbced78e804f7313409 (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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7274 f5534014-38df-0310-8fa8-9805f1628bb7
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 {