From owner-freebsd-net Fri Sep 21 11:27:47 2001 Delivered-To: freebsd-net@freebsd.org Received: from hetnet.nl (net047s.hetnet.nl [194.151.104.151]) by hub.freebsd.org (Postfix) with ESMTP id E2CC037B425 for ; Fri, 21 Sep 2001 11:27:43 -0700 (PDT) Received: from wdegraafdp866 ([209.131.52.217]) by hetnet.nl with Microsoft SMTPSVC(5.5.1877.757.75); Fri, 21 Sep 2001 20:22:25 +0200 Message-ID: <003301c142cb$1b924690$d93483d1@inktomi.com> From: "Wilbert de Graaf" To: "deepika kakrania" Cc: References: <20010921092510.54909.qmail@web11207.mail.yahoo.com> Subject: Re: IP multicasting... Date: Fri, 21 Sep 2001 11:27:43 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > But where is the validity check being done when query > is Version 2 General query in which case > igmp_group.s_addr SHOULD BE Zero and ip_dst.s_addr > SHOULD be igmp_all_hosts_group. > > i.e., we need a validity check something like > > if (igmp->igmp_group.s_addr == 0 && > ip->ip_dst.s_addr != igmp_all_hosts_group) { > > ++igmpstat.igps_rcv_badqueries; > m_freem(m); > return; > } > > Don't we need this for V2 GENERAL query? Yes, you're right. The IGMPv2 indeed says the dest-ip of a general query should be zero. This patch worked for me. *************** *** 245,251 **** * New router. Simply do the new validity check. */ ! if (igmp->igmp_group.s_addr != 0 && !IN_MULTICAST(ntohl(igmp->igmp_group.s_addr))) { ++igmpstat.igps_rcv_badqueries; m_freem(m); --- 245,252 ---- * New router. Simply do the new validity check. */ ! if (igmp->igmp_group.s_addr == 0 ? ! ip->ip_dst.s_addr != igmp_all_hosts_group : !IN_MULTICAST(ntohl(igmp->igmp_group.s_addr))) { ++igmpstat.igps_rcv_badqueries; m_freem(m); Wilbert Btw. If you're interested, I have a patch for IGMPv3 (http://home.hetnet.nl/~wilbertdg/igmpv3.html). It doesn't include that check either. I'll add the check to that patch later. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message