diff options
author | shin <shin@FreeBSD.org> | 2000-01-28 05:27:14 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-01-28 05:27:14 +0000 |
commit | f8e48f511e5de002b13eb638515c1422d6ca1173 (patch) | |
tree | 1eb6af1af4a59a559f8ec716ab60a22fb5f3a761 /sys/netinet6/ip6_input.c | |
parent | 417b54f8df0382bc71e299bb3cf35e74b2579e6c (diff) | |
download | FreeBSD-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_input.c')
-rw-r--r-- | sys/netinet6/ip6_input.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 8953a5d..083f780 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -403,7 +403,7 @@ ip6_input(m) IN6_LOOKUP_MULTI(ip6->ip6_dst, m->m_pkthdr.rcvif, in6m); if (in6m) ours = 1; - else { + else if (!ip6_mrouter) { ip6stat.ip6s_notmember++; ip6stat.ip6s_cantforward++; in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_discard); @@ -539,6 +539,19 @@ ip6_input(m) * Forward if desirable. */ if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { + /* + * If we are acting as a multicast router, all + * incoming multicast packets are passed to the + * kernel-level multicast forwarding function. + * The packet is returned (relatively) intact; if + * ip6_mforward() returns a non-zero value, the packet + * must be discarded, else it may be accepted below. + */ + if (ip6_mrouter && ip6_mforward(ip6, m->m_pkthdr.rcvif, m)) { + ip6stat.ip6s_cantforward++; + m_freem(m); + return; + } if (!ours) { m_freem(m); return; |