Terry Donaldson wrote:
Hello,
I've removed the built-in Solaris 10 x86 (8/07) version of ipf and now
I'm
trying to build and install the latest version. Building ipf seems to go
o.k. but complains about not being able to attach at the tail end of the
pkgadd of ipf.pkg:
devfsadm: driver failed to attach: ipf
These messages appear in /var/adm/messages:
Sep 11 15:26:31 proxy genunix: [ID 819705 kern.notice]
/usr/kernel/drv/ipf:
undefined symbol
Sep 11 15:26:31 proxy genunix: [ID 826211 kern.notice]
'ipf_route_lookupv4'
Sep 11 15:26:31 proxy genunix: [ID 819705 kern.notice]
/usr/kernel/drv/ipf:
undefined symbol
Sep 11 15:26:31 proxy genunix: [ID 826211 kern.notice]
'ipf_route_lookupv6'
This is a classic example of "it's working, hmm, let me clean up the
code, yes,
it compiles..." and of course it will with unknown symbols for
LKMs...patch below.
And now the LKM does load...
I don't know if that has anything to do with pfil not being installed
yet,
but I haven't been able to build that either. This is what happens
when I
try to compile it (pfil-2.1.13):
0.05 [EMAIL PROTECTED]:pfil> make package
i=`uname -s`; case $i in HP-UX) make hpux;; *) make $i;; esac
make SunOS32
(cd SunOS; make pfil "BITS=32" OS=solaris DO=pfil
"ADEF=-I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2="`uname -r | sed -e
's/[0-9]*\.\([0-9]*\).*/\1/'`" -DPFILDEBUG")
cc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=10 -DPFILDEBUG -c qif.c -o
qif.o
"qif.c", line 216: warning: argument mismatch
"qif.c", line 216: syntax error before or at: )
"qif.c", line 217: syntax error before or at: )
"qif.c", line 225: "break" outside loop or switch
< more errors follow >
Do not build pfil, there is no need for it.
Darren
*** ip_fil_solaris.c 9 Sep 2007 11:32:05 -0000 2.62.2.41
--- ip_fil_solaris.c 15 Sep 2007 09:02:02 -0000
***************
*** 943,952 ****
ire_refrele(dir);
# endif
#else
! if (fin->fin_v == 4)
! result = (ipf_route_lookupv4(fin->fin_dst) == fin->fin_ifp);
! else
! result = (ipf_route_lookupv6(&fin->fin_dst6) ==
fin->fin_ifp);
#endif
return result;
}
--- 943,949 ----
ire_refrele(dir);
# endif
#else
! result = (qif_illrouteto(fin->fin_v, &fin->fin_dst) ==
fin->fin_ifp);
#endif
return result;
}