Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Aug 2007 02:40:10 GMT
From:      Vernon Schryver <vjs@calcite.rhyolite.com>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/111493: routed doesn't use multicasts for RIPv2 via P2P interfaces
Message-ID:  <200708100240.l7A2eApV075493@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/111493; it has been noted by GNATS.

From: Vernon Schryver <vjs@calcite.rhyolite.com>
To: carlsonj@workingcode.com
Cc: bms@incunabulum.net, dan@obluda.cz, freebsd-gnats-submit@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@calcite.rhyolite.com>
 > Cc: dan@obluda.cz, bms@incunabulum.net, freebsd-gnats-submit@FreeBSD.org
 > From: James Carlson <carlsonj@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@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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708100240.l7A2eApV075493>