From owner-freebsd-hackers Wed Aug 23 07:53:49 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id HAA07177 for hackers-outgoing; Wed, 23 Aug 1995 07:53:49 -0700 Received: from alpha.xerox.com (alpha.Xerox.COM [13.1.64.93]) by freefall.FreeBSD.org (8.6.11/8.6.6) with SMTP id HAA07167 for ; Wed, 23 Aug 1995 07:53:46 -0700 Received: from crevenia.parc.xerox.com ([13.2.116.11]) by alpha.xerox.com with SMTP id <14577(5)>; Wed, 23 Aug 1995 07:52:58 PDT Received: from localhost by crevenia.parc.xerox.com with SMTP id <177475>; Wed, 23 Aug 1995 07:52:52 -0700 To: "Michael C. Newell" cc: Bill Fenner , hackers@freebsd.org Subject: Re: Multicast on PPP devices In-reply-to: Your message of "Wed, 23 Aug 95 05:37:11 PDT." Date: Wed, 23 Aug 1995 07:52:51 PDT From: Bill Fenner Message-Id: <95Aug23.075252pdt.177475@crevenia.parc.xerox.com> Sender: hackers-owner@freebsd.org Precedence: bulk In message 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; \ }