Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Aug 1995 07:52:51 PDT
From:      Bill Fenner <fenner@parc.xerox.com>
To:        "Michael C. Newell" <mnewell@lupine.nsi.nasa.gov>
Cc:        Bill Fenner <fenner@parc.xerox.com>, hackers@freebsd.org
Subject:   Re: Multicast on PPP devices 
Message-ID:  <95Aug23.075252pdt.177475@crevenia.parc.xerox.com>
In-Reply-To: Your message of "Wed, 23 Aug 95 05:37:11 PDT." <Pine.SUN.3.91.950823083203.14011A-100000@lupine.nsi.nasa.gov> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.SUN.3.91.950823083203.14011A-100000@lupine.nsi.nasa.gov> you w
rite:
>> Barring that, someone seems to have changed the INADDR_TO_IFP macro in
>> netinet/in_var.h to only search destination addresses, rather than local
>> addresses, on point-to-point interfaces.  This will cause mrouted no end
>> of grief.
>
>Hmmmmm...  I guess that was done so that ppp links can share IP addresses 
>with Ethernet links?  That may be the general case, but there are many 
>cases (such as mine :-) were that is NOT desired.

Right.  In fact, since multicast routing can't handle the shared addresses,
I'm not sure what the point of doing it is.  In any case, apply this patch
to netinet/in_var.h; it restores the original behavior after doing the
special pointtopoint behavior.

  Bill

*** in_var.h	Wed Aug 23 07:48:55 1995
--- in_var.h.new	Wed Aug 23 07:48:12 1995
***************
*** 94,99 ****
--- 94,101 ----
  /*
   * Macro for finding the interface (ifnet structure) corresponding to one
   * of our IP addresses.
+  *
+  * Check destination addresses of P<>P addresses first, then look again.
   */
  #define INADDR_TO_IFP(addr, ifp) \
  	/* struct in_addr addr; */ \
***************
*** 106,111 ****
--- 108,118 ----
  		IA_DSTSIN(ia):IA_SIN(ia))->sin_addr.s_addr != (addr).s_addr; \
  	    ia = ia->ia_next) \
  		 continue; \
+ 	if (ia == NULL) \
+ 	    for (ia = in_ifaddr; \
+ 		ia != NULL && IA_SIN(ia)->sin_addr.s_addr != (addr).s_addr; \
+ 		ia = ia->ia_next) \
+ 		    continue; \
  	(ifp) = (ia == NULL) ? NULL : ia->ia_ifp; \
  }
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?95Aug23.075252pdt.177475>