Subject: Re: Processing of IGMP packets in ip_input
To: None <dattatri@pipalsys.com>
From: Hitoshi Asaeda <Hitoshi.Asaeda@sophia.inria.fr>
List: tech-net
Date: 12/03/2002 12:17:07
> Currently the code in ip_input assumes that user-land will get IGMP raw
> packet only if MRT_INIT is done. I suggest we move the lines
> 
> if (ip->ip_p == IPPROTO_IGMP)
> 	goto ours;
> 
> after the if(ip_mrouter) {...} so that userland can get IGMP packets
> without doing MRT_INIT.

No. It should not.

Checking IPPROTO_IGMP should be able only for a multicast router,
since a multicast router needs to receive "every" IGMP packet whether
or not it belongs to the destination groups.
For an end host, following IN_LOOKUP_MULTI() makes it receive only
multicast data packet (including IGMP packet) whose destination
address specifies one of the belonging groups.
--
Hitoshi Asaeda