diff options
| author | Yoshinobu Inoue <shin@FreeBSD.org> | 2000-01-28 05:27:14 +0000 |
|---|---|---|
| committer | Yoshinobu Inoue <shin@FreeBSD.org> | 2000-01-28 05:27:14 +0000 |
| commit | 91ec0a1e84a188270173862aeeb29e4b9b4dab34 (patch) | |
| tree | fed5dde9bd942136b21bcc369ab894b94288da8b /sys/netinet6/ip6_output.c | |
| parent | 0fea3d51659b3fd4d015170aa26845ef719a27b9 (diff) | |
Notes
Diffstat (limited to 'sys/netinet6/ip6_output.c')
| -rw-r--r-- | sys/netinet6/ip6_output.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 73326c996cf5..0909e9b15b49 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, |
