bin/111493: routed doesn't use multicasts for RIPv2 via P2P interfaces

Vernon Schryver vjs at calcite.rhyolite.com
Thu Aug 9 19:40:10 PDT 2007


The following reply was made to PR bin/111493; it has been noted by GNATS.

From: Vernon Schryver <vjs at calcite.rhyolite.com>
To: carlsonj at workingcode.com
Cc: bms at incunabulum.net, dan at obluda.cz, freebsd-gnats-submit at FreeBSD.org
Subject: Re: bin/111493: routed doesn't use multicasts for RIPv2 via P2P interfaces
Date: Fri, 10 Aug 2007 02:39:32 GMT

 > To: Vernon Schryver <vjs at calcite.rhyolite.com>
 > Cc: dan at obluda.cz, bms at incunabulum.net, freebsd-gnats-submit at FreeBSD.org
 > From: James Carlson <carlsonj at workingcode.com>
 
 
 > We've done a fair amount of compatibility testing, and I don't know of
 > any issues with the default above.  The Zebra/Quagga code seems to
 > perform similarly: it checks if the interface supports multicast
 > (IFF_MULTICAST) before bothering to check whether it's point-to-point.
 
 that's interesting.
 
 > One key difference is that unicast IP messages can be accidentally
 > forwarded by innocent misconfigurations, while 255.255.255.255 and
 > link-local multicast must not be.
 
 and I suppose static configuration instead of PPP negotiation of the peer
 IP address could let a point-to-point RIPv2 packet get forwarded instead
 of delivered to the PPP peer.
 
 Ok, I yield.
 
 What do you think of the enclose patch?  It differs from the original
 in two ways that should reduce behavior changes seen by people with
 IFF_POINTOPOINT interfaces without IFF_MULTICAST.  If it makes sense,
 I'll generate a bundle on http://www.rhyolite.com/src/
 
 
 Vernon Schryver    vjs at rhyolite.com
 
 
 *** /d/backups/day.5/usr/home/vjs/routed/output.c	Thu Nov 11 17:34:52 2004
 --- output.c	Fri Aug 10 02:26:09 2007
 *************** output(enum output_type type,
 *** 142,148 ****
   		flags = MSG_DONTROUTE;
   		break;
   	case OUT_MULTICAST:
 ! 		if (ifp->int_if_flags & IFF_POINTOPOINT) {
   			msg = "Send pt-to-pt";
   		} else if (ifp->int_state & IS_DUP) {
   			trace_act("abort multicast output via %s"
 --- 142,149 ----
   		flags = MSG_DONTROUTE;
   		break;
   	case OUT_MULTICAST:
 ! 		if ((ifp->int_if_flags & IFF_POINTOPOINT)
 ! 		    && !(ifp->int_if_flags & IFF_MULTICAST)) {
   			msg = "Send pt-to-pt";
   		} else if (ifp->int_state & IS_DUP) {
   			trace_act("abort multicast output via %s"
 *************** rip_bcast(int flash)
 *** 876,882 ****
 --- 877,890 ----
   		} else if (ifp->int_if_flags & IFF_POINTOPOINT) {
   			/* point-to-point hardware interface */
   			dst.sin_addr.s_addr = ifp->int_dstaddr;
 + 			/* use multicast if the interface allows (e.g. GRE) */
 + 			if (vers == RIPv2
 + 			    && (ifp->int_if_flags & IFF_MULTICAST)
 + 			    && !(ifp->int_state & IS_NO_RIP_MCAST)) {
 + 				type = OUT_MULTICAST;
 + 			} else {
   				type = OUT_UNICAST;
 + 			}
   
   		} else if (ifp->int_state & IS_REMOTE) {
   			/* remote interface */
 *************** rip_query(void)
 *** 965,971 ****
 --- 973,986 ----
   		} else if (ifp->int_if_flags & IFF_POINTOPOINT) {
   			/* point-to-point hardware interface */
   			dst.sin_addr.s_addr = ifp->int_dstaddr;
 + 			/* use multicast if the interface allows (e.g. GRE) */
 + 			if (buf.rip_vers == RIPv2
 + 			    && (ifp->int_if_flags & IFF_MULTICAST)
 + 			    && !(ifp->int_state & IS_NO_RIP_MCAST)) {
 + 				type = OUT_MULTICAST;
 + 			} else {
   				type = OUT_UNICAST;
 + 			}
   
   		} else if (ifp->int_state & IS_REMOTE) {
   			/* remote interface */


More information about the freebsd-bugs mailing list