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.
This commit is contained in:
Poul-Henning Kamp 2009-04-05 12:41:59 +00:00
parent cd899aad76
commit c2aabe6855
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190709

View File

@ -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 */