broadcast and multicast RIP on the same interface?

Pavel Machek pavel at suse.cz
Wed Mar 6 16:11:22 CET 2002


Hi!

> Is there any reason why broadcast and multicast RIP can't be run on the
> same interface?  I haven't read the RFCs, but we'd only be using

I did not see why its usefull so I just did not allow it..

> this in
> a student lab setting with the multicast interface in mode "quiet", so I
> think it should be okay.  Here's a patch to bird-1.0.5 to allow
> this:

Looks okay to me. (Please, diff -u next time.)

mj, I no longer have checked-out bird (low on disk space, etc.), can
you please apply it?
								Pavel


> *** proto/rip/rip.c.orig	Wed Aug 23 01:53:49 2000
> --- proto/rip/rip.c	Wed Mar  6 09:48:04 2002
> ***************
> *** 770,789 ****
>     if (c & IF_CHANGE_UP) {
>       struct iface_patt *k = iface_patt_match(&P_CF->iface_list, iface);
>       struct object_lock *lock;
>   
>       if (!k) return; /* We are not interested in this interface */
>   
>       lock = olock_new( p->pool );
>   #ifndef IPV6
> !     lock->addr = ipa_from_u32(0xe0000009);	/* This is okay: we
> ! 						   may actually use
> ! 						   other address, but
> ! 						   we do not want two
> ! 						   rips at one time,
> ! 						   anyway. */
>   #else
> !     ip_pton("FF02::9", &lock->addr);
>   #endif
>       lock->port = P_CF->port;
>       lock->iface = iface;
>       lock->hook = rip_real_if_add;
> --- 770,788 ----
>     if (c & IF_CHANGE_UP) {
>       struct iface_patt *k = iface_patt_match(&P_CF->iface_list, iface);
>       struct object_lock *lock;
> +     struct rip_patt *PATT = (struct rip_patt *) k;
>   
>       if (!k) return; /* We are not interested in this interface */
>   
>       lock = olock_new( p->pool );
> +     if (!(PATT->mode & IM_BROADCAST) && (iface->flags & IF_MULTICAST))
>   #ifndef IPV6
> !       lock->addr = ipa_from_u32(0xe0000009);
>   #else
> !       ip_pton("FF02::9", &lock->addr);
>   #endif
> +     else
> +       lock->addr = iface->addr->brd;
>       lock->port = P_CF->port;
>       lock->iface = iface;
>       lock->hook = rip_real_if_add;

-- 
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.



More information about the Bird-users mailing list