From owner-cvs-src@FreeBSD.ORG Fri Aug 20 22:27:05 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99F6E16A4CE; Fri, 20 Aug 2004 22:27:05 +0000 (GMT) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2FDC43D2D; Fri, 20 Aug 2004 22:27:04 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i7KMR0ct060921 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 21 Aug 2004 01:27:01 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.1/8.13.1) id i7KMR24R095601; Sat, 21 Aug 2004 01:27:02 +0300 (EEST) (envelope-from ru) Date: Sat, 21 Aug 2004 01:27:02 +0300 From: Ruslan Ermilov To: Andre Oppermann Message-ID: <20040820222702.GC73483@ip.net.ua> References: <20040820192058.3BE26790032@ws1-14.us4.outblaze.com> <41265A04.25A48B17@freebsd.org> <20040820204236.GA73564@ip.net.ua> <41267079.47F2ADA4@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2/5bycvrmDh4d1IB" Content-Disposition: inline In-Reply-To: <41267079.47F2ADA4@freebsd.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new cc: cvs-src@FreeBSD.org cc: "P.D. Seniura" Subject: Re: problem in building modules-with-world re: cvs commit:src/sys/netinet ip_fw_pfil.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2004 22:27:05 -0000 --2/5bycvrmDh4d1IB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 20, 2004 at 11:43:21PM +0200, Andre Oppermann wrote: > Ruslan Ermilov wrote: > > > > > I have just cvsupped -current and the GENERIC kernel compiles jus= t fine. > > > > > > > > > > Looking at the error message in your log output one might conclud= e that you > > > > > are missing "option INET" in your kernel config? > > > > > > > > MODULES_WITH_WORLD > > > > > > > > Please read the subject line. ;) > > > > > > Ok, there seems to be a problem with setting up the environment when = doing > > > this. Why do you build modules with WORLD instead of doing it with t= he > > > kernel? This sounds quite dangerous to me when kernel/modules go out= of > > > sync. > > > > > > Ruslan, do you have any idea what is going wrong? > > > > > Yes. You removed far too much in your conversion. ;) >=20 > Yes and no. The goal was to get a ipfw module that can have IPDIVERT > (requires kernel to have it too) and IPFIREWALL_FORWARD (kernel doesn't > matter, just won't work if kernel doesn't have it) in it. When building > the modules together with the kernel it works because the opt_* files > are around. This doesn't seem to be the case when building it with > world. Isn't there some #define when it is compiled with world? >=20 No, there is not. When modules are built outside of the kernel, you never know which kernel it will be linked with at run time. Since you don't know if a kernel will have IPDIVERT support or not, you cannot deliberately compile a module with -DIPDIVERT in CFLAGS. (When compiling with a kernel, it's not a problem -- you get the necessary information from opt_ipdivert.h.) I'd say, put the another commented out line to modules/ipfw/Makefile: #CFLAGS+=3D -DIPDIVERT The existing ones are here for the MODULES_WITH_WORLD and standalone build cases, decoupled from the kernel build. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --2/5bycvrmDh4d1IB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQFBJnq2qRfpzJluFF4RAr0vAJ4jmdz7h+Urli2nZocdvAVabCptugCfddVc Xz21rZEp/7BMV1VH4emeNng= =cNrI -----END PGP SIGNATURE----- --2/5bycvrmDh4d1IB--