Darren Reed wrote:
> > But line 242 seems to be more severe. There is no prototype for ire_lookup()
> > in /usr/include/inet/ip_ire.h and this symbol does in fact not exist in the
> > kernel. The only ire lookup functions with a single argument (of type
> > ipaddr_t)
> > are ire_cache_lookup() and ire_lookup_loop_multi(). But ire_lookup() seems
> > to have existed in early versions of Solaris 2.x.
> > In previous versions of pfil, this error did not show up, since ire_lookup()
> > was never used under Solaris 7 and higher (in pkt.c and qif.c) because of
> > #ifdef MATCH_IRE_DSTONLY (which _is_ defined in /usr/include/inet/ip_ire.h).
> >
> >
>
> If you change the ">= 8" in pkt.c to ">= 7", what works?
>
> Do you need to change all of them or jsut some?
If I change this in line 238, a new bug occurs:
"pkt.c", line 240: prototype mismatch: 9 args passed, 8 expected
cc: acomp failed for pkt.c
In fact, the prototype of ire_ftable_lookup() has changed from Solaris 7 to 8:
*** Solaris 7:
extern ire_t *ire_ftable_lookup(ipaddr_t addr, ipaddr_t mask,
ipaddr_t gateway, int type,
ipif_t *ipif, ire_t **pire, queue_t *wrq,
int flag);
*** Solaris 8 and 9:
extern ire_t *ire_ftable_lookup(ipaddr_t, ipaddr_t, ipaddr_t, int, ipif_t *,
ire_t **, queue_t *, uint32_t, int);
*** Solaris 10:
extern ire_t *ire_ftable_lookup(ipaddr_t, ipaddr_t, ipaddr_t, int, ipif_t *,
ire_t **, zoneid_t, uint32_t, int);
Also, in Solaris >= 8, there is a separate ire_ftable_lookup_v6().
Thus, a possible solution for Solaris 7 (what about 2.6, 2.5[.1]?) might be
to omit the second-to-last argument of ire_ftable_lookup():
***************
*** 238,243 ****
--- 238,246 ----
#if SOLARIS2 >= 8
sif = ire_ftable_lookup(addr, 0, 0, IRE_INTERFACE, NULL, NULL, 0, 0,
MATCH_IRE_TYPE);
+ #elif SOLARIS2 == 7
+ sif = ire_ftable_lookup(addr, 0, 0, IRE_INTERFACE, NULL, NULL, 0,
+ MATCH_IRE_TYPE);
#else
sif = ire_lookup(src);
#endif
***************
*** 264,270 ****
#if SOLARIS2 >= 8
src.s_addr = ipif->ipif_lcl_addr;
#else
- src = ipif->ipif_local_addr;
+ src.s_addr = ipif->ipif_local_addr;
#endif
MI_BCOPY(&src, n, a->areq_sender_addr_offset, 4);
CAVEAT: I have not found any documentation about this and do not know anything
about the meanings! Also, I can presently only test compilation, not execution.