Date: Sun, 5 Apr 2009 12:41:59 +0000 (UTC) From: Poul-Henning Kamp <phk@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r190709 - head/sbin/routed Message-ID: <200904051241.n35CfxsA018304@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904051241.n35CfxsA018304>