Unbreak call to ipf_check(): it expects the out parameter to be 0 or 1.

Pointy hat to:	glebius
Reported by:	cy
This commit is contained in:
Gleb Smirnoff 2019-02-01 07:48:37 +00:00
parent 4edc7f418a
commit 647b604144

View File

@ -135,8 +135,8 @@ ipf_check_wrapper(struct mbuf **mp, struct ifnet *ifp, int flags,
pfil_return_t rv;
CURVNET_SET(ifp->if_vnet);
rv = ipf_check(&V_ipfmain, ip, ip->ip_hl << 2, ifp, (flags & PFIL_OUT),
mp);
rv = ipf_check(&V_ipfmain, ip, ip->ip_hl << 2, ifp,
!!(flags & PFIL_OUT), mp);
CURVNET_RESTORE();
return (rv == 0 ? PFIL_PASS : PFIL_DROPPED);
}
@ -150,7 +150,7 @@ ipf_check_wrapper6(struct mbuf **mp, struct ifnet *ifp, int flags,
CURVNET_SET(ifp->if_vnet);
rv = ipf_check(&V_ipfmain, mtod(*mp, struct ip *),
sizeof(struct ip6_hdr), ifp, (flags & PFIL_OUT), mp);
sizeof(struct ip6_hdr), ifp, !!(flags & PFIL_OUT), mp);
CURVNET_RESTORE();
return (rv == 0 ? PFIL_PASS : PFIL_DROPPED);