Changeset View
Changeset View
Standalone View
Standalone View
sys/netpfil/ipfw/ip_fw_dynamic.c
Show First 20 Lines • Show All 1,167 Lines • ▼ Show 20 Lines | |||||
dyn_getscopeid(const struct ip_fw_args *args) | dyn_getscopeid(const struct ip_fw_args *args) | ||||
{ | { | ||||
/* | /* | ||||
* If source or destination address is an scopeid address, we need | * If source or destination address is an scopeid address, we need | ||||
* determine the scope zone id to resolve address scope ambiguity. | * determine the scope zone id to resolve address scope ambiguity. | ||||
*/ | */ | ||||
if (IN6_IS_ADDR_LINKLOCAL(&args->f_id.src_ip6) || | if (IN6_IS_ADDR_LINKLOCAL(&args->f_id.src_ip6) || | ||||
IN6_IS_ADDR_LINKLOCAL(&args->f_id.dst_ip6)) { | IN6_IS_ADDR_LINKLOCAL(&args->f_id.dst_ip6)) | ||||
MPASS(args->oif != NULL || | return (in6_getscopezone(args->ifp, IPV6_ADDR_SCOPE_LINKLOCAL)); | ||||
args->m->m_pkthdr.rcvif != NULL); | |||||
return (in6_getscopezone(args->oif != NULL ? args->oif: | |||||
args->m->m_pkthdr.rcvif, IPV6_ADDR_SCOPE_LINKLOCAL)); | |||||
} | |||||
return (0); | return (0); | ||||
} | } | ||||
/* | /* | ||||
* Lookup IPv6 state. | * Lookup IPv6 state. | ||||
* Must be called in critical section. | * Must be called in critical section. | ||||
*/ | */ | ||||
static struct dyn_ipv6_state * | static struct dyn_ipv6_state * | ||||
▲ Show 20 Lines • Show All 2,077 Lines • Show Last 20 Lines |