summaryrefslogtreecommitdiffstats
path: root/sbin/routed
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2009-04-05 12:41:59 +0000
committerphk <phk@FreeBSD.org>2009-04-05 12:41:59 +0000
commit30f1c1184a5ef994c6ac5facae5369990bacc998 (patch)
tree88dad67b7eac9f7e609f0cafd5a04d16f901f537 /sbin/routed
parent01bf63c9fb60c7104bfbbcfd5be8c1deab29ea6a (diff)
downloadFreeBSD-src-30f1c1184a5ef994c6ac5facae5369990bacc998.zip
FreeBSD-src-30f1c1184a5ef994c6ac5facae5369990bacc998.tar.gz
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.
Diffstat (limited to 'sbin/routed')
-rw-r--r--sbin/routed/output.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sbin/routed/output.c b/sbin/routed/output.c
index c555c21..a8f092b0 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 */
OpenPOWER on IntegriCloud