Subject: Re: multicast routing over vifs broken?
To: None <tech-net@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: tech-net
Date: 07/26/2005 21:18:55
In article <20050726172800.E60DC52F1@fnord.ir.bbn.com>,
Greg Troxel  <gdt@NetBSD.org> wrote:
>My group has been setting up dynamic tunnels in mrouted over wireless
>interfaces, and found what looks like a bug in
>sys/netinet/ip_mroute.c:vif_input().
>
>The protocol is checked against AF_INET (2), when it seems like it
>should be checked against ENCAP_PROTO (IPPROTO_IPIP, which is 4).
>As a result incoming packets on vifs are dropped.
>
>	if (!vifp || proto != AF_INET) {
>		m_freem(m);
>		mrtstat.mrts_bad_tunnel++;
>		return;
>	}
>
>This code was last touched on 08-May-01 in revision 1.54, which
>changed to use the new encap matching framework.
>
>Christine Jones of BBN found this, and when changed to ENCAP_PROTO
>packets are received on vifs.
>
>The code seems "clearly wrong by inspection", but given that it's been
>4 years I wonder if we're somehow confused.  Has mrouted with vifs
>worked for anyone since May 2001?  Should I just change AF_INET to
>ENCAP_PROTO?

Yes you should :-)

christos