svn commit: r190709 - head/sbin/routed

Poul-Henning Kamp phk at FreeBSD.org
Sun Apr 5 05:42:00 PDT 2009


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


More information about the svn-src-all mailing list