Fix a bug reported by Dave Nicoson:

Igmp v1 membership reports should not be misdetected as v2 reports
(don't confuse the query with the report).

svn path=/trunk/; revision=8074
This commit is contained in:
Jörg Mayer 2003-07-23 19:38:52 +00:00
parent de1990a0ab
commit 1732b3bc9b
1 changed files with 4 additions and 9 deletions

View File

@ -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.22 2003/03/04 06:47:09 guy Exp $
* $Id: packet-igmp.c,v 1.23 2003/07/23 19:38:52 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -294,7 +294,7 @@ static const value_string mtrace_fwd_code_vals[] = {
};
#define PRINT_IGMP_VERSION(version) \
if (check_col(pinfo->cinfo, COL_INFO)) { \
if (check_col(pinfo->cinfo, COL_INFO)) { \
col_add_fstr(pinfo->cinfo, COL_INFO, \
"V%d %s",version,val_to_str(type, commands, \
"Unknown Type:0x%02x")); \
@ -817,13 +817,8 @@ dissect_igmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
}
break;
case IGMP_V1_HOST_MEMBERSHIP_REPORT: /* 0x12 v1/v2 */
/* v1 and v2 differs in second byte of header */
if (tvb_get_guint8(tvb, offset)) {
offset = dissect_igmp_v2(tvb, pinfo, tree, type, offset);
} else {
offset = dissect_igmp_v1(tvb, pinfo, tree, type, offset);
}
case IGMP_V1_HOST_MEMBERSHIP_REPORT: /* 0x12 v1 only */
offset = dissect_igmp_v1(tvb, pinfo, tree, type, offset);
break;
case IGMP_DVMRP: