broadcast and multicast RIP on the same interface?

birdie at sigint.cs.purdue.edu birdie at sigint.cs.purdue.edu
Wed Mar 6 16:04:12 CET 2002


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 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:

*** 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;



More information about the Bird-users mailing list