NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/47850: ipfstat is broken.



The following reply was made to PR bin/47850; it has been noted by GNATS.

From: Takahiro HAYASHI <t.hash425%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost
Cc: 
Subject: Re: kern/47850: ipfstat is broken.
Date: Wed, 14 May 2014 20:08:59 +0900

 > Synopsis:       ipfstat does not list all the rules anymore
 
 The patch provided in http://gnats.netbsd.org/47850
 causes infinite recursive call and dump core.
 This should do like as netbsd-6's ipfstat does.
 
 Index: src/external/bsd/ipf/dist/tools/ipfstat.c
 ===================================================================
 RCS file: /cvsroot/src/external/bsd/ipf/dist/tools/ipfstat.c,v
 retrieving revision 1.3
 diff -u -p -r1.3 ipfstat.c
 --- src/external/bsd/ipf/dist/tools/ipfstat.c  22 Jul 2012 14:27:51 -0000      
1.3
 +++ src/external/bsd/ipf/dist/tools/ipfstat.c  7 Feb 2014 12:12:28 -0000
 @@ -916,6 +916,16 @@ printlivelist(fiop, out, set, fp, group,
                }
        } while (fp->fr_next != NULL);
   
 +      if (group == NULL) {
 +              while ((g = grtop) != NULL) {
 +                      printf("# Group %s\n", g->fg_name);
 +                      printlivelist(fiop, out, set, NULL, g->fg_name,
 +                                      comment);
 +                      grtop = g->fg_next;
 +                      free(g);
 +              }
 +      }
 +
        num = IPFGENITER_IPF;
        (void) ioctl(ipf_fd,SIOCIPFDELTOK, &num);
   
 
 -- 
 t-hash
 


Home | Main Index | Thread Index | Old Index