svn commit: r343645 - head/sys/contrib/ipfilter/netinet
Gleb Smirnoff
glebius at FreeBSD.org
Fri Feb 1 07:48:38 UTC 2019
Author: glebius
Date: Fri Feb 1 07:48:37 2019
New Revision: 343645
URL: https://svnweb.freebsd.org/changeset/base/343645
Log:
Unbreak call to ipf_check(): it expects the out parameter to be 0 or 1.
Pointy hat to: glebius
Reported by: cy
Modified:
head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
==============================================================================
--- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Fri Feb 1 06:19:12 2019 (r343644)
+++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Fri Feb 1 07:48:37 2019 (r343645)
@@ -135,8 +135,8 @@ ipf_check_wrapper(struct mbuf **mp, struct ifnet *ifp,
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
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);
More information about the svn-src-all
mailing list