Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Feb 2019 07:48:37 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343645 - head/sys/contrib/ipfilter/netinet
Message-ID:  <201902010748.x117mbQT069709@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902010748.x117mbQT069709>