Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/ip6_forward.c
Show First 20 Lines • Show All 318 Lines • ▼ Show 20 Lines | #endif | ||||
in6_clearscope(&ip6->ip6_src); | in6_clearscope(&ip6->ip6_src); | ||||
in6_clearscope(&ip6->ip6_dst); | in6_clearscope(&ip6->ip6_dst); | ||||
/* Jump over all PFIL processing if hooks are not active. */ | /* Jump over all PFIL processing if hooks are not active. */ | ||||
if (!PFIL_HOOKED(&V_inet6_pfil_hook)) | if (!PFIL_HOOKED(&V_inet6_pfil_hook)) | ||||
goto pass; | goto pass; | ||||
odst = ip6->ip6_dst; | odst = ip6->ip6_dst; | ||||
/* Run through list of hooks for output packets. */ | /* Run through list of hooks for forwarded packets. */ | ||||
error = pfil_run_hooks(&V_inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT, NULL); | error = pfil_run_hooks(&V_inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT, | ||||
PFIL_FWD, NULL); | |||||
if (error != 0 || m == NULL) | if (error != 0 || m == NULL) | ||||
goto freecopy; /* consumed by filter */ | goto freecopy; /* consumed by filter */ | ||||
ip6 = mtod(m, struct ip6_hdr *); | ip6 = mtod(m, struct ip6_hdr *); | ||||
/* See if destination IP address was changed by packet filter. */ | /* See if destination IP address was changed by packet filter. */ | ||||
if (!IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst)) { | if (!IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst)) { | ||||
m->m_flags |= M_SKIP_FIREWALL; | m->m_flags |= M_SKIP_FIREWALL; | ||||
/* If destination is now ourself drop to ip6_input(). */ | /* If destination is now ourself drop to ip6_input(). */ | ||||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |