pfil-2.0pre3 under Solaris Sparc with GCC 3.3.2 does not compile.
Complains about the S64FLAGS not being valid, without the flags the
program compiles but does not allow any packets through any interfaces.
Eg S64FLAGS=-m64 -mcmodel=medlow -DDO=pfil${SBITS}
Regards,
Adam
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hans Werner
Strube
Sent: Thursday, 27 November 2003 9:02 PM
To: [EMAIL PROTECTED]
Subject: Re: IP Filter 4.0beta4
Darren Reed <avalon () caligula ! anu ! edu ! au> wrote:
> In some mail from Hans Werner Strube, sie said:
...
> > Especially, for compiling fil.c under Solaris or HPUX you need a
pfil which
> > defines a member qpi_data of struct qpktinfo in qif.h. Version 2.0
doesn't
> > do this yet. Darren, please help!
>
> Look on:
>
> http://coombs.anu.edu.au/~avalon/ipf-mentat.html
Thanks! When compiling pfil-2.0pre3 under Solaris, I still found a
change in
SunOS/pfildrv.c to be required:
*** SunOS/pfildrv.c.ORI Thu Oct 23 19:52:01 2003
--- SunOS/pfildrv.c Thu Nov 27 10:22:22 2003
***************
*** 16,21 ****
--- 16,22 ----
#include <sys/stat.h>
#include <sys/cmn_err.h>
#include <sys/dlpi.h>
+ #include <sys/kmem.h>
#include <net/if.h>
#include <net/if_dl.h>
#include <inet/common.h>
Further, to avoid some warnings under Solaris 7, the following changes
in
pfilstream.c and SunOS/qif.c are also recommended:
*** pfilstream.c.ORI Sun Nov 9 18:57:23 2003
--- pfilstream.c Thu Nov 27 10:28:24 2003
***************
*** 24,29 ****
--- 24,31 ----
# include <inet/common.h>
# if SOLARIS2 >= 8
# include <netinet/ip6.h>
+ #else
+ # include <net/if_dl.h>
# endif
# include <inet/ip.h>
# include <inet/ip_if.h>
*** SunOS/qif.c.ORI Sun Nov 9 18:56:36 2003
--- SunOS/qif.c Thu Nov 27 10:33:24 2003
***************
*** 322,328 ****
if (qif_verbose > 0)
cmn_err(CE_NOTE, "PFIL: attaching [%s] - %s",
qif->qf_name,
SAPNAME(qif));
! #if SOLARIS2 < 8
ire_walk(qif_ire_walker, qif);
#else
ire_walk(qif_ire_walker, (char *)qif);
--- 322,328 ----
if (qif_verbose > 0)
cmn_err(CE_NOTE, "PFIL: attaching [%s] - %s",
qif->qf_name,
SAPNAME(qif));
! #if SOLARIS2 < 7
ire_walk(qif_ire_walker, qif);
#else
ire_walk(qif_ire_walker, (char *)qif);
If the QF_V4_ macros are used (presently they are not), Solaris 7 needs
the following change in qif.h:
*** qif.h.ORI Thu Oct 23 19:52:01 2003
--- qif.h Thu Nov 27 10:04:45 2003
***************
*** 51,57 ****
#ifdef sun
! # if SOLARIS2 < 7
# define QF_V4_ADDR(x) \
((ill_t
*)(x)->qf_ill)->ill_ipif->ipif_local_addr
# define QF_V4_BROADCAST(x) \
--- 51,57 ----
#ifdef sun
! # if SOLARIS2 <= 7
# define QF_V4_ADDR(x) \
((ill_t
*)(x)->qf_ill)->ill_ipif->ipif_local_addr
# define QF_V4_BROADCAST(x) \
Finally, the version numbers in pfil.h and SunOS/pkginfo.dist do not
match
the distribution version 2.0pre3 and should be updated.