>  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 [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to