On Fri, Sep 26, 2003 at 09:10:38AM -0400, [EMAIL PROTECTED] wrote:
> > On Fri, Sep 26, 2003 at 09:03:21AM -0400, [EMAIL PROTECTED] wrote:
> 
> On this box, 100% sure.  I built the package in:
> 
> ~src/ip_fil3.4.33pre1
> 
> and just to be sure, I'm running ~src/ip_fil3.4.33pre1/SunOS5/i386-5.8/ipfstat.
> This is the first time I've grabbed 3.4.33pre1, so my running ipf:
> 
>       # ipf -V
>       ipf: IP Filter: v3.4.33pre1 (432)
>       Kernel: IP Filter: v3.4.33pre1          
> 
> was absolutely built from this tree.
> 

Okay..this is a bug in ipf.

Please try the attached patch (only need to recompile ipfstat, not
the kernel).

-Guido
--- fils.c.orig Sat Jun  7 13:37:03 2003
+++ fils.c      Fri Sep 26 15:20:42 2003
@@ -118,6 +118,7 @@
 int    use_inet6 = 0;
 int    live_kernel = 1;
 int    state_fd = -1;
+int    auth_fd = -1;
 int    ipf_fd = -1;
 
 #ifdef STATETOP
@@ -243,6 +244,10 @@
                        perror("open");
                        exit(-1);
                }
+               if ((auth_fd = open(IPL_AUTH, O_RDONLY)) == -1) {
+                       perror("open");
+                       exit(-1);
+               }
                if ((ipf_fd = open(device, O_RDONLY)) == -1) {
                        perror("open");
                        exit(-1);
@@ -439,7 +444,7 @@
                PRINTF("opts %#x name %s\n", opts, device);
 
        if ((opts & OPT_AUTHSTATS) &&
-           (ioctl(ipf_fd, SIOCATHST, frauthstpp) == -1)) {
+           (ioctl(auth_fd, SIOCATHST, frauthstpp) == -1)) {
                perror("ioctl(SIOCATHST)");
                exit(-1);
        }

Reply via email to