X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/b0d623f7f2ae71ed96e60569f61f9a9a27016e80..b7266188b87f3620ec3f9f717e57194a7dd989fe:/bsd/netinet6/ip6_input.c diff --git a/bsd/netinet6/ip6_input.c b/bsd/netinet6/ip6_input.c index 390be10d1..cdf3776b2 100644 --- a/bsd/netinet6/ip6_input.c +++ b/bsd/netinet6/ip6_input.c @@ -170,10 +170,12 @@ int ip6_ours_check_algorithm; int in6_init2done = 0; +#if IPFW2 /* firewall hooks */ ip6_fw_chk_t *ip6_fw_chk_ptr; ip6_fw_ctl_t *ip6_fw_ctl_ptr; int ip6_fw_enable = 1; +#endif struct ip6stat ip6stat; @@ -481,6 +483,7 @@ ip6_input(m) ip6stat.ip6s_nxthist[ip6->ip6_nxt]++; +#if IPFW2 /* * Check with the firewall... */ @@ -497,6 +500,7 @@ ip6_input(m) return; } } +#endif /* * Check against address spoofing/corruption. @@ -633,7 +637,11 @@ ip6_input(m) ifnet_lock_done(ifp); if (in6m) ours = 1; +#if MROUTING else if (!ip6_mrouter) { +#else + else { +#endif ip6stat.ip6s_notmember++; ip6stat.ip6s_cantforward++; in6_ifstat_inc(ifp, ifs6_in_discard); @@ -898,12 +906,14 @@ ip6_input(m) * ip6_mforward() returns a non-zero value, the packet * must be discarded, else it may be accepted below. */ +#if MROUTING if (ip6_mrouter && ip6_mforward(ip6, m->m_pkthdr.rcvif, m)) { ip6stat.ip6s_cantforward++; m_freem(m); lck_mtx_unlock(ip6_mutex); return; } +#endif if (!ours) { m_freem(m); lck_mtx_unlock(ip6_mutex);