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:
parent
4edc7f418a
commit
647b604144
@ -135,8 +135,8 @@ ipf_check_wrapper(struct mbuf **mp, struct ifnet *ifp, int flags,
|
|||||||
pfil_return_t rv;
|
pfil_return_t rv;
|
||||||
|
|
||||||
CURVNET_SET(ifp->if_vnet);
|
CURVNET_SET(ifp->if_vnet);
|
||||||
rv = ipf_check(&V_ipfmain, ip, ip->ip_hl << 2, ifp, (flags & PFIL_OUT),
|
rv = ipf_check(&V_ipfmain, ip, ip->ip_hl << 2, ifp,
|
||||||
mp);
|
!!(flags & PFIL_OUT), mp);
|
||||||
CURVNET_RESTORE();
|
CURVNET_RESTORE();
|
||||||
return (rv == 0 ? PFIL_PASS : PFIL_DROPPED);
|
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);
|
CURVNET_SET(ifp->if_vnet);
|
||||||
rv = ipf_check(&V_ipfmain, mtod(*mp, struct ip *),
|
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();
|
CURVNET_RESTORE();
|
||||||
|
|
||||||
return (rv == 0 ? PFIL_PASS : PFIL_DROPPED);
|
return (rv == 0 ? PFIL_PASS : PFIL_DROPPED);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user