From owner-freebsd-alpha Fri Oct 26 19:44:36 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from mailin9.bigpond.com (mailin9.bigpond.com [139.134.6.86]) by hub.freebsd.org (Postfix) with ESMTP id C57DB37B40A for ; Fri, 26 Oct 2001 19:44:31 -0700 (PDT) Received: from CPE-61-9-164-106.vic.bigpond.net.au ([144.135.24.72]) by mailin9.bigpond.com (Netscape Messaging Server 4.15) with SMTP id GLRRPP00.4I7 for ; Fri, 26 Oct 2001 02:13:01 +1000 Received: from 144.137.1.99 ([144.137.1.99]) by bwmam02.mailsvc.email.bigpond.com(MailRouter V2.9k 8317/7759538); 26 Oct 2001 02:06:24 Received: (from root@localhost) by CPE-61-9-164-106.vic.bigpond.net.au (8.11.0/8.11.0) id f9PAmRF07962; Thu, 25 Oct 2001 20:48:27 +1000 From: Darren Reed Message-Id: <200110242348.JAA06267@avalon.reed.wattle.id.au> Subject: Re: ipfilter bug (was: Re: compiler bugs? ) In-Reply-To: <20011024164534.857FF39F3@overcee.netplex.com.au> from Peter Wemm at "Oct 24, 1 09:45:34 am" To: peter@wemm.org (Peter Wemm) Date: Thu, 25 Oct 2001 09:48:19 +1000 Cc: astouffer@adelphia.net, freebsd-alpha@FreeBSD.ORG, darrenr@reed.wattle.id.au X-Mailer: ELM [version 2.4ME+ PL37 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Thanks Peter! Darren In some email I received from Peter Wemm, sie wrote: > Adam Stouffer wrote: > > I'm trying to get ipfilter compiled so this box can be made into a > > firewall. After getting the latest ipfilter sources (3.4.21) I follow the > > instructions and type 'make freebsd4' after a minute or so it stops with > > this error: > > > > cc1: warnings being treated as errors > > ../../ip_auth.c: In function `fr_auth_ioctl': > > ../../ip_auth.c:344: warning: comparison is always false due to limited > > range of data type > > *** Error code 1 > > > > Line 344 shows: > > > > if (cmd == SIOCRMAFR) { > > > > After emailing Darren Reed he says its because of a compiler bug. Is this > > true? 4.4 release also ships with the same 2.95.3 version of gcc. Also why > > is ipfilter not included in the ports tree? Thanks. > > Nope. It is a code bug in ipfilter: > > int fr_auth_ioctl(data, mode, cmd, fr, frptr) > caddr_t data; > int mode; > #if defined(__NetBSD__) || defined(__OpenBSD__) || (FreeBSD_version >= 300003) > ^^^^^^^^^^^^^^^^^^^ > u_long cmd; > #else > int cmd; > #endif > > It is __FreeBSD_version, not FreeBSD_version. This means that it is using > the 'int cmd' form, which is not large enough to represent the SIOCRMAFR > ioctl value. > > > Adam > > Cheers, > -Peter > -- > Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au > "All of this is for nothing if we don't go to the stars" - JMS/B5 > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message