Rabellino Sergio wrote:
...
2 troubles:
1) found a trivial syntax error in line 498 of ip_fil_solaris.c:
missing ( at the beginning of the if statement
./../ip_fil_solaris.c: In function `fr_send_ip':
./../ip_fil_solaris.c:498: error: parse error before '(' token
./../ip_fil_solaris.c:498: error: parse error before ')' token
#if !defined(_INET_IP_STACK_H)
if ( (ip_mtudisc != NULL) && (*ip_mtudisc == 0))
^^^
2) Where can be found `hook_pkt_event_t' on a Solaris 9 system ? I'm
compiling ipf against pfil-2.1.13 and i've not found where it's defined.
Sigh, the attached patch should take care of both.
Darren
Index: ip_fil_solaris.c
===================================================================
RCS file: /devel/CVS/IP-Filter/ip_fil_solaris.c,v
retrieving revision 2.62.2.42
diff -c -r2.62.2.42 ip_fil_solaris.c
*** ip_fil_solaris.c 21 Sep 2007 09:03:39 -0000 2.62.2.42
--- ip_fil_solaris.c 21 Sep 2007 18:13:15 -0000
***************
*** 495,501 ****
#endif
ip->ip_ttl = 63;
#if !defined(_INET_IP_STACK_H)
! if (ip_mtudisc != NULL) && (*ip_mtudisc == 0))
#else
if (!net_getpmtuenabled(ipfipv4))
#endif
--- 495,501 ----
#endif
ip->ip_ttl = 63;
#if !defined(_INET_IP_STACK_H)
! if ((ip_mtudisc != NULL) && (*ip_mtudisc == 0))
#else
if (!net_getpmtuenabled(ipfipv4))
#endif
Index: solaris.c
===================================================================
RCS file: /devel/CVS/IP-Filter/solaris.c,v
retrieving revision 2.73.2.14
diff -c -r2.73.2.14 solaris.c
*** solaris.c 16 Sep 2007 23:04:00 -0000 2.73.2.14
--- solaris.c 21 Sep 2007 18:13:43 -0000
***************
*** 670,675 ****
--- 670,676 ----
}
+ #if defined(_INET_IP_STACK_H)
static int
ipf_hook(hook_event_token_t event, hook_data_t data, netstack_t *stp)
{
***************
*** 712,714 ****
--- 713,716 ----
}
return 0;
}
+ #endif