Date: Fri, 21 Sep 2001 11:27:43 -0700 From: "Wilbert de Graaf" <wilbertdg@hetnet.nl> To: "deepika kakrania" <deepika_77@yahoo.com> Cc: <freebsd-net@FreeBSD.ORG> Subject: Re: IP multicasting... Message-ID: <003301c142cb$1b924690$d93483d1@inktomi.com> References: <20010921092510.54909.qmail@web11207.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003301c142cb$1b924690$d93483d1>