Subject: Re: CVS commit: syssrc
To: None <thorpej@zembu.com>
From: Hitoshi Asaeda <asaeda@yamato.ibm.co.jp>
List: tech-net
Date: 07/06/2000 13:12:21
I answer the position for pimd.

> Well... I looked again, and vifs are used for non-tunnels, as well... but

Yes. vifs are not only for tunnel/encapslation interface. Every vif is 
linked to each physical and virtual (i.e. tunnel/encap.) interface.

> it should certainly be safe to eliminate the VIFF_TUNNEL cases from
> ip_mrouted.c.

(See following.)

> I guess there could be an rsvpd or a pimd that uses the vif stuff, and
> possibly gated, as well.  But it should be safe to simply not use the
> tunnel configuration mechanisms in any of those (if they exist).

Actually, pimd code has VIFF_TUNNEL, but it is not used.
And, pimd supports encapslation interface, like gif*, gre*, whose flag
does *not* have VIFF_TUNNEL bit.
(I included tunnel support in pimd-2.1.0a18. I don't finish the test
yet, though..)
As for current pimd's implementation, an encapslation interface is
also recognized as one of physical interface, and pimd doesn't care
every packet coming through the interface is originally encapslated or
not, since it believes kernel would already deal with incoming packets
and just receive them through rip_input() after the kernel handling
(i.e. stripping the outer header).
However, pimd must know which interface the packet comes from. This
means PIM-SM does have its own message, PIM_HELLO and so on, with
TTL=1, and when pimd accept every packet from kernel, it examines the
validation, like sender's address. If the sender is not connected with 
one of pimd's segment, then the message should be discarded. Remember, 
if the packet is come from encapslation interface, this check logic
must be chenged. To do this, some interface flag to classify the kinds
of interfaces is needed. But VIFF_TUNNEL doesn't stay for this
purpose.
I made a long story here, though, *as for pimd*, I believe it can be
eliminated. (Of course, the flag includes in the daemon codes must be
eliminated before doing that.:)

>  > 	using it, so i thought that rewriting ip_mroute.c is better than
>  > 	rewriting mrouted.

I feel rewriting mrouted is also required if VIFF_TUNNEL is
eliminated. (Sorry if I'm wrong. I've never checked mrouted code.)
IMO, to delete unneded flag, VIFF_TUNNEL, rewriting both of mrouted
and ip_mroute.c is prefered.:)

ps. I forgot to put kernel patches for NetBSD-1.5_ALPHA which works
with pimd on a site, http://catarina.usc.edu/pim. Within a few days,
the patches would be released. Check it if interests.
Yes, my patch doesn't remove VIFF_TUNNEL.:)
--
Hitoshi Asaeda