Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/ip6_fastfwd.c
Show First 20 Lines • Show All 151 Lines • ▼ Show 20 Lines | #endif | ||||
dst.sin6_len = sizeof(dst); | dst.sin6_len = sizeof(dst); | ||||
dst.sin6_addr = ip6->ip6_dst; | dst.sin6_addr = ip6->ip6_dst; | ||||
/* | /* | ||||
* Incoming packet firewall processing. | * Incoming packet firewall processing. | ||||
*/ | */ | ||||
if (!PFIL_HOOKED(&V_inet6_pfil_hook)) | if (!PFIL_HOOKED(&V_inet6_pfil_hook)) | ||||
goto passin; | goto passin; | ||||
if (pfil_run_hooks(&V_inet6_pfil_hook, &m, rcvif, PFIL_IN, | if (pfil_run_hooks(&V_inet6_pfil_hook, &m, rcvif, PFIL_IN, 0, | ||||
NULL) != 0 || m == NULL) | NULL) != 0 || m == NULL) | ||||
goto dropin; | goto dropin; | ||||
/* | /* | ||||
* If packet filter sets the M_FASTFWD_OURS flag, this means | * If packet filter sets the M_FASTFWD_OURS flag, this means | ||||
* that new destination or next hop is our local address. | * that new destination or next hop is our local address. | ||||
* So, we can just go back to ip6_input. | * So, we can just go back to ip6_input. | ||||
* XXX: should we decrement ip6_hlim in such case? | * XXX: should we decrement ip6_hlim in such case? | ||||
* | * | ||||
Show All 27 Lines | passin: | ||||
} | } | ||||
/* | /* | ||||
* Outgoing packet firewall processing. | * Outgoing packet firewall processing. | ||||
*/ | */ | ||||
if (!PFIL_HOOKED(&V_inet6_pfil_hook)) | if (!PFIL_HOOKED(&V_inet6_pfil_hook)) | ||||
goto passout; | goto passout; | ||||
if (pfil_run_hooks(&V_inet6_pfil_hook, &m, nh.nh_ifp, PFIL_OUT, | if (pfil_run_hooks(&V_inet6_pfil_hook, &m, nh.nh_ifp, PFIL_OUT, | ||||
NULL) != 0 || m == NULL) | PFIL_FWD, NULL) != 0 || m == NULL) | ||||
goto dropout; | goto dropout; | ||||
/* | /* | ||||
* We used slow path processing for packets with scoped addresses. | * We used slow path processing for packets with scoped addresses. | ||||
* So, scope checks aren't needed here. | * So, scope checks aren't needed here. | ||||
*/ | */ | ||||
if (m->m_pkthdr.len > nh.nh_mtu) { | if (m->m_pkthdr.len > nh.nh_mtu) { | ||||
in6_ifstat_inc(nh.nh_ifp, ifs6_in_toobig); | in6_ifstat_inc(nh.nh_ifp, ifs6_in_toobig); | ||||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |