From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 12:41:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDD6F10656FC; Sun, 5 Apr 2009 12:41:59 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC1168FC12; Sun, 5 Apr 2009 12:41:59 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n35CfxVD018305; Sun, 5 Apr 2009 12:41:59 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n35CfxsA018304; Sun, 5 Apr 2009 12:41:59 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <200904051241.n35CfxsA018304@svn.freebsd.org> From: Poul-Henning Kamp Date: Sun, 5 Apr 2009 12:41:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190709 - head/sbin/routed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2009 12:42:00 -0000 Author: phk Date: Sun Apr 5 12:41:59 2009 New Revision: 190709 URL: http://svn.freebsd.org/changeset/base/190709 Log: Send multicast on p2p interfaces if they can and are not prohibited from doing so with no_rip_mcast in /etc/gateways. This allows routed(8) to work with the way ports/security/openvpn employs the tun(4) interface. Modified: head/sbin/routed/output.c Modified: head/sbin/routed/output.c ============================================================================== --- head/sbin/routed/output.c Sun Apr 5 09:27:19 2009 (r190708) +++ head/sbin/routed/output.c Sun Apr 5 12:41:59 2009 (r190709) @@ -139,7 +139,8 @@ output(enum output_type type, flags = MSG_DONTROUTE; break; case OUT_MULTICAST: - if (ifp->int_if_flags & IFF_POINTOPOINT) { + if (ifp->int_if_flags & (IFF_POINTOPOINT|IFF_MULTICAST) == + IFF_POINTOPOINT) { msg = "Send pt-to-pt"; } else if (ifp->int_state & IS_DUP) { trace_act("abort multicast output via %s" @@ -859,7 +860,13 @@ rip_bcast(int flash) } else if (ifp->int_if_flags & IFF_POINTOPOINT) { /* point-to-point hardware interface */ dst.sin_addr.s_addr = ifp->int_dstaddr; - type = OUT_UNICAST; + 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 */