From owner-freebsd-alpha Wed Oct 24 9:45:45 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [24.14.150.180]) by hub.freebsd.org (Postfix) with ESMTP id 8B42F37B40B for ; Wed, 24 Oct 2001 09:45:34 -0700 (PDT) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f9OGjYM35345 for ; Wed, 24 Oct 2001 09:45:34 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 857FF39F3; Wed, 24 Oct 2001 09:45:34 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Adam Stouffer Cc: freebsd-alpha@FreeBSD.ORG, Darren Reed Subject: ipfilter bug (was: Re: compiler bugs? ) In-Reply-To: <4.3.2.7.2.20011024003858.00b43500@pop> Date: Wed, 24 Oct 2001 09:45:34 -0700 From: Peter Wemm Message-Id: <20011024164534.857FF39F3@overcee.netplex.com.au> 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 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