Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/ip6_output.c
Show First 20 Lines • Show All 786 Lines • ▼ Show 20 Lines | if (ip6_process_hopopts(m, (u_int8_t *)(hbh + 1), | ||||
error = EINVAL;/* better error? */ | error = EINVAL;/* better error? */ | ||||
goto done; | goto done; | ||||
} | } | ||||
m->m_flags &= ~M_LOOP; /* XXX */ | m->m_flags &= ~M_LOOP; /* XXX */ | ||||
m->m_pkthdr.rcvif = NULL; | m->m_pkthdr.rcvif = NULL; | ||||
} | } | ||||
/* 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_OUT(V_inet6_pfil_head)) | ||||
goto passout; | goto passout; | ||||
odst = ip6->ip6_dst; | odst = ip6->ip6_dst; | ||||
/* Run through list of hooks for output packets. */ | /* Run through list of hooks for output packets. */ | ||||
error = pfil_run_hooks(&V_inet6_pfil_hook, &m, ifp, PFIL_OUT, 0, inp); | switch (pfil_run_hooks(V_inet6_pfil_head, &m, ifp, PFIL_OUT, inp)) { | ||||
if (error != 0 || m == NULL) | case PFIL_PASS: | ||||
goto done; | |||||
/* adjust pointer */ | |||||
ip6 = mtod(m, struct ip6_hdr *); | ip6 = mtod(m, struct ip6_hdr *); | ||||
break; | |||||
case PFIL_DROPPED: | |||||
error = EPERM; | |||||
/* FALLTHROUGH */ | |||||
case PFIL_CONSUMED: | |||||
goto done; | |||||
} | |||||
needfiblookup = 0; | needfiblookup = 0; | ||||
/* 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(). */ | ||||
if (in6_localip(&ip6->ip6_dst)) { | if (in6_localip(&ip6->ip6_dst)) { | ||||
m->m_flags |= M_FASTFWD_OURS; | m->m_flags |= M_FASTFWD_OURS; | ||||
▲ Show 20 Lines • Show All 2,326 Lines • Show Last 20 Lines |