Any pfil(9) hooks should be called with already set VNET context.

Reviewed by:	bz
This commit is contained in:
Gleb Smirnoff 2012-10-08 23:02:32 +00:00
parent 8f35d5f3e9
commit b833c0d990
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=241360

View File

@ -3475,9 +3475,7 @@ pf_check_in(void *arg, struct mbuf **m, struct ifnet *ifp, int dir,
{
int chk;
CURVNET_SET(ifp->if_vnet);
chk = pf_test(PF_IN, ifp, m, inp);
CURVNET_RESTORE();
if (chk && *m) {
m_freem(*m);
*m = NULL;
@ -3498,9 +3496,7 @@ pf_check_out(void *arg, struct mbuf **m, struct ifnet *ifp, int dir,
(*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
}
CURVNET_SET(ifp->if_vnet);
chk = pf_test(PF_OUT, ifp, m, inp);
CURVNET_RESTORE();
if (chk && *m) {
m_freem(*m);
*m = NULL;