From owner-cvs-all@FreeBSD.ORG Sat Dec 25 00:33:00 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58EB016A4CE; Sat, 25 Dec 2004 00:33:00 +0000 (GMT) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1478643D1F; Sat, 25 Dec 2004 00:32:59 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a130.otenet.gr [212.205.215.130]) iBP0WghF030439; Sat, 25 Dec 2004 02:32:52 +0200 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.1/8.13.1) with ESMTP id iBP0WZnO008051; Sat, 25 Dec 2004 02:32:36 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.1/8.13.1/Submit) id iBP0WZiE008049; Sat, 25 Dec 2004 02:32:35 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Sat, 25 Dec 2004 02:32:35 +0200 From: Giorgos Keramidas To: Scott Long Message-ID: <20041225003235.GA7963@gothmog.gr> References: <200412240914.iBO9EQwi030378@repoman.freebsd.org> <41CC8E1E.3020809@freebsd.org> <20041224231120.GA70659@gothmog.gr> <41CCA2CC.6080408@freebsd.org> <20041225000752.GA84593@gothmog.gr> <41CCB08C.80207@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41CCB08C.80207@freebsd.org> cc: Darren Reed cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/contrib/ipfilter/netinet ip_auth.cip_compat.h ip_frag.c ip_log.c ip_nat.h ip_proxy.c ip_state.c ip_state.h mlfk_ipl.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Dec 2004 00:33:00 -0000 On 2004-12-24 17:13, Scott Long wrote: > Giorgos Keramidas wrote: > >On 2004-12-24 16:14, Scott Long wrote: > > > >>Giorgos Keramidas wrote: > >> > >>>On 2004-12-24 14:46, Scott Long wrote: > >>> > >>>>Darren Reed wrote: > >>>> > >>>>>darrenr 2004-12-24 09:14:26 UTC > >>>>> > >>>>>FreeBSD src repository > >>>>> > >>>>>Modified files: > >>>>> sys/contrib/ipfilter/netinet ip_auth.c ip_compat.h ip_frag.c > >>>>> ip_log.c ip_nat.h ip_proxy.c > >>>>> ip_state.c ip_state.h mlfk_ipl.c > >>>>>Log: > >>>>>Enable fine grained locking within IPFilter, using mtx(9) and sx(9) > >>>>>allowing > >>>>>the the "needs giant" flag to be removed from the driver. > >>>> > >>>>I'm not sure how this could possibly compile on FreeBSD. Did you forget > >>>>to check in a file perhaps? Please fix this ASAP, otherwise it's going > >>>>to get reverted. > >>> > >>>Hi Scott, > >>> > >>>can you test this as a fix for the build problems? It seems to fix the > >>>buildkernel issues here. The arbitrary choise of __FreeBSD_version's > >>>value was based on this snippet from > >>>src/sys/ipfilter/netinet/ip_compat.h: > >> > >>Thanks, I'll test it in a few minutes. Would you also be willing to fix > >>the warning from PFIL_HOOKS being redefined? > > > > > >Sure. The ip_fil.h header defines PFIL_HOOKS unconditionally, possibly > >overriding the definition passed on the command line by the Makefile of > >src/sys/modules/ipfilter. > > > >There are two options: > > > >a) Either we remove the -DPFIL_HOOKS from the Makefile (possibly resulting > >in other breakages at places where ip_fil.h is not included, even though > >it should be), or > > > >b) we commit something like this minor diff to ip_fil.h: > > > >%%% > >gothmog:/usr/src# cvs di -u sys/contrib/ipfilter/netinet/ip_fil.h > >Index: sys/contrib/ipfilter/netinet/ip_fil.h > >=================================================================== > >RCS file: /home/ncvs/src/sys/contrib/ipfilter/netinet/ip_fil.h,v > >retrieving revision 1.27 > >diff -u -r1.27 ip_fil.h > >--- sys/contrib/ipfilter/netinet/ip_fil.h 27 Aug 2004 20:01:08 -0000 > >1.27 > >+++ sys/contrib/ipfilter/netinet/ip_fil.h 25 Dec 2004 00:03:19 -0000 > >@@ -498,7 +498,9 @@ > > (defined(NetBSD1_2) && NetBSD1_2 > 1) || (defined(__FreeBSD_version) > > && \ > > (__FreeBSD_version >= 500011)) > > # if (NetBSD >= 199905) || (__FreeBSD_version >= 600001) > >-# define PFIL_HOOKS > >+# ifndef PFIL_HOOKS > >+# define PFIL_HOOKS > >+# endif > > # endif > > # ifdef PFIL_HOOKS > > # define NETBSD_PF > >%%% > > I don't see anywhere in the ipfilter source where PFIL_HOOKS is actually > checked. PFIL_HOOKS was removed as an option from FreeBSD a few months > ago and is now assumed to always be present. True. I remember this. The PFIL_HOOKS ifdef doesn't work as a kernel option anymore in ipfilter though. > Maybe we should just remove the __FreeBSD_version from the clause. PFIL_HOOKS is used in ip_fil.h to check if NETBSD_PF should be defined. We need NETBSD_PF defined, because it is used in fil.c and ip_fil.c as a conditional. These will break if NETBSD_PF is not defined, as they depend on NETBSD_PF and ip_compat.h to include the pfil interface from