From owner-freebsd-bugs@FreeBSD.ORG Fri Aug 10 02:40:10 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92D8416A41B for ; Fri, 10 Aug 2007 02:40:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7618F13C468 for ; Fri, 10 Aug 2007 02:40:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l7A2eAEF075494 for ; Fri, 10 Aug 2007 02:40:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l7A2eApV075493; Fri, 10 Aug 2007 02:40:10 GMT (envelope-from gnats) Date: Fri, 10 Aug 2007 02:40:10 GMT Message-Id: <200708100240.l7A2eApV075493@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Vernon Schryver Cc: Subject: Re: bin/111493: routed doesn't use multicasts for RIPv2 via P2P interfaces X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Vernon Schryver List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2007 02:40:10 -0000 The following reply was made to PR bin/111493; it has been noted by GNATS. From: Vernon Schryver 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 > Cc: dan@obluda.cz, bms@incunabulum.net, freebsd-gnats-submit@FreeBSD.org > From: James Carlson > 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 */