diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2009-04-05 12:41:59 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2009-04-05 12:41:59 +0000 |
commit | c2aabe685537c291bb2783c2b2d75e69b2f62a5b (patch) | |
tree | 88dad67b7eac9f7e609f0cafd5a04d16f901f537 /sbin | |
parent | cd899aad76943c09d420c6545f5fd6376cdb0454 (diff) | |
download | src-c2aabe685537c291bb2783c2b2d75e69b2f62a5b.tar.gz src-c2aabe685537c291bb2783c2b2d75e69b2f62a5b.zip |
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.
Notes
Notes:
svn path=/head/; revision=190709
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/routed/output.c | 11 |
1 files 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 */ |