Changeset View
Changeset View
Standalone View
Standalone View
sys/net/if_enc.c
Show First 20 Lines • Show All 295 Lines • ▼ Show 20 Lines | #endif | ||||
default: | default: | ||||
ph = NULL; | ph = NULL; | ||||
} | } | ||||
if (ph == NULL || !PFIL_HOOKED(ph)) | if (ph == NULL || !PFIL_HOOKED(ph)) | ||||
return (0); | return (0); | ||||
/* Make a packet looks like it was received on enc(4) */ | /* Make a packet looks like it was received on enc(4) */ | ||||
rcvif = (*ctx->mp)->m_pkthdr.rcvif; | rcvif = (*ctx->mp)->m_pkthdr.rcvif; | ||||
(*ctx->mp)->m_pkthdr.rcvif = ifp; | (*ctx->mp)->m_pkthdr.rcvif = ifp; | ||||
if (pfil_run_hooks(ph, ctx->mp, ifp, pdir, ctx->inp) != 0 || | if (pfil_run_hooks(ph, ctx->mp, ifp, pdir, 0, ctx->inp) != 0 || | ||||
*ctx->mp == NULL) { | *ctx->mp == NULL) { | ||||
*ctx->mp = NULL; /* consumed by filter */ | *ctx->mp = NULL; /* consumed by filter */ | ||||
return (EACCES); | return (EACCES); | ||||
} | } | ||||
(*ctx->mp)->m_pkthdr.rcvif = rcvif; | (*ctx->mp)->m_pkthdr.rcvif = rcvif; | ||||
enc_bpftap(ifp, *ctx->mp, ctx->sav, hhook_type, | enc_bpftap(ifp, *ctx->mp, ctx->sav, hhook_type, | ||||
IPSEC_ENC_AFTER_PFIL, ctx->af); | IPSEC_ENC_AFTER_PFIL, ctx->af); | ||||
return (0); | return (0); | ||||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |