summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/ip6_output.c
diff options
context:
space:
mode:
authorshin <shin@FreeBSD.org>2000-01-28 05:27:14 +0000
committershin <shin@FreeBSD.org>2000-01-28 05:27:14 +0000
commitf8e48f511e5de002b13eb638515c1422d6ca1173 (patch)
tree1eb6af1af4a59a559f8ec716ab60a22fb5f3a761 /sys/netinet6/ip6_output.c
parent417b54f8df0382bc71e299bb3cf35e74b2579e6c (diff)
downloadFreeBSD-src-f8e48f511e5de002b13eb638515c1422d6ca1173.zip
FreeBSD-src-f8e48f511e5de002b13eb638515c1422d6ca1173.tar.gz
Sorry I didn't commit these files at the commit just a few minutes before.
(IPv6 multicast routing) I think I mistakenly touched TAB and the last arg sys/netinet6 to the cvs commit changed to sys/netinet6/in6_proto.c.
Diffstat (limited to 'sys/netinet6/ip6_output.c')
-rw-r--r--sys/netinet6/ip6_output.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 73326c9..0909e9b 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -661,6 +661,25 @@ skip_ipsec2:;
* forbid loopback, loop back a copy.
*/
ip6_mloopback(ifp, m, dst);
+ } else {
+ /*
+ * If we are acting as a multicast router, perform
+ * multicast forwarding as if the packet had just
+ * arrived on the interface to which we are about
+ * to send. The multicast forwarding function
+ * recursively calls this function, using the
+ * IPV6_FORWARDING flag to prevent infinite recursion.
+ *
+ * Multicasts that are looped back by ip6_mloopback(),
+ * above, will be forwarded by the ip6_input() routine,
+ * if necessary.
+ */
+ if (ip6_mrouter && (flags & IPV6_FORWARDING) == 0) {
+ if (ip6_mforward(ip6, ifp, m) != NULL) {
+ m_freem(m);
+ goto done;
+ }
+ }
}
/*
* Multicasts with a hoplimit of zero may be looped back,
OpenPOWER on IntegriCloud