From c2aabe685537c291bb2783c2b2d75e69b2f62a5b Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sun, 5 Apr 2009 12:41:59 +0000 Subject: [PATCH] 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. --- sbin/routed/output.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sbin/routed/output.c b/sbin/routed/output.c index c555c21660f0..a8f092b08b76 100644 --- a/sbin/routed/output.c +++ b/sbin/routed/output.c @@ -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 */