IP Filter bug report form.
--------------------------
IP Filter Version: 4.1.10
Operating System Version: Solaris 9 x86
Configuration: LKM
Description of problem:
Running make solaris produces errors when compiling ip_nat.c and fil.c
How to repeat:
Install the ip filter 4.1.10. Install gcc 2.95.3.
Set CC=gcc. Run make solaris. Notice:
gcc -I. -g -I../.. -D_BSD_SOURCE -DSOLARIS2=9 -DIPFILTER_LOG -DIPFILTER_LOOKUP
-DIPFILTER_SCAN -DIPFILTER_SYNC -DIPFILTER_CKSUM -c ../../ip_nat.c -o
ip_nat_u.o
../../ip_nat.c: In function `fr_natexpire':
../../ip_nat.c:4350: parse error before `int'
../../ip_nat.c:4354: `i' undeclared (first use in this function)
../../ip_nat.c:4354: (Each undeclared identifier is reported only once
../../ip_nat.c:4354: for each function it appears in.)
gcc -I../.. -DIPF_DEFAULT_PASS=FR_PASS -DIPFILTER_LKM -I../../../pfil -D_KERNEL
-DSUNDDI -DSOLARIS2=9 -DIPFILTER_LOG -DIPFILTER_LOOKUP -DIPFILTER_SCAN -c
../../fil.c -o fil.o
../../fil.c: In function `fr_check':
../../fil.c:2327: parse error before `*'
../../fil.c:2343: `qpi' undeclared (first use in this function)
../../fil.c:2343: (Each undeclared identifier is reported only once
../../fil.c:2343: for each function it appears in.)
The enclosed * lightly * tested patch fixes the problem of SPL_INT being
defined as empty confusing the compiler due to an empty statement appearing
in the middle of declaring variables.
*** ip_nat.c.ORIGINAL Mon Nov 14 12:13:35 2005
--- ip_nat.c Mon Jan 16 19:14:53 2006
***************
*** 4346,4353 ****
{
ipftq_t *ifq, *ifqnext;
ipftqent_t *tqe, *tqn;
- SPL_INT(s);
int i;
SPL_NET(s);
WRITE_ENTER(&ipf_nat);
--- 4346,4353 ----
{
ipftq_t *ifq, *ifqnext;
ipftqent_t *tqe, *tqn;
int i;
+ SPL_INT(s);
SPL_NET(s);
WRITE_ENTER(&ipf_nat);
*** fil.c.ORIGINAL Wed Dec 7 03:15:16 2005
--- fil.c Mon Jan 16 19:15:52 2006
***************
*** 2313,2318 ****
--- 2313,2321 ----
#ifdef USE_INET6
ip6_t *ip6;
#endif
+ #if defined(_KERNEL) && defined(MENTAT)
+ qpktinfo_t *qpi = qif;
+ #endif
SPL_INT(s);
/*
***************
*** 2324,2331 ****
*/
#ifdef _KERNEL
# ifdef MENTAT
- qpktinfo_t *qpi = qif;
-
if ((u_int)ip & 0x3)
return 2;
# endif
--- 2327,2332 ----
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: [EMAIL PROTECTED] |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------