Date: Wed, 24 Oct 2001 09:45:34 -0700 From: Peter Wemm <peter@wemm.org> To: Adam Stouffer <astouffer@adelphia.net> Cc: freebsd-alpha@FreeBSD.ORG, Darren Reed <darrenr@reed.wattle.id.au> Subject: ipfilter bug (was: Re: compiler bugs? ) Message-ID: <20011024164534.857FF39F3@overcee.netplex.com.au> In-Reply-To: <4.3.2.7.2.20011024003858.00b43500@pop>
index | next in thread | previous in thread | raw e-mail
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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011024164534.857FF39F3>
