> From: Darren Reed Thu, 25 Mar 2004 02:11:06 +1100 (EST) > In some email I received from Hans Werner Strube, sie wrote: ... > > In Solaris 7_x86, I copied a newly built ipfrule (from rules/ip_rules) > > to /usr/kernel/drv and called > > modload /usr/kernel/drv/ipfrule > > This always resulted in the message > > can't load module: Unknown error > > Try this patch for size. ... > Index: tools/ipfcomp.c > =================================================================== > RCS file: /devel/CVS/IP-Filter/tools/ipfcomp.c,v > retrieving revision 1.24 > diff -c -r1.24 ipfcomp.c > *** ipfcomp.c 2004/01/24 16:04:29 1.24 > --- ipfcomp.c 2004/03/24 15:06:58 > *************** > *** 1289,1294 **** > --- 1289,1297 ---- > fp->fr_flags = FR_%sQUE|FR_NOMATCH;\n\ > fp->fr_data = (void *)ipf_rules_%s_%s[0];\n", > (in != 0) ? "IN" : "OUT", instr, group); > + fprintf(fp, "\ > + fp->fr_dsize = sizeof(ipf_rules_%s_%s[0]);\n", > + instr, group); > > fprintf(fp, "\ > fp->fr_v = 4;\n\ >
Yes, this works, thanks again! But now, ipfboot is no more compatible with this. Module ipfrule, if present, should be modload-ed after ipf and modunload-ed before ipf. In getids(), "id" must be replaced by two separate variables.
