diff options
Diffstat (limited to 'contrib/ipfilter/tools/ipf.c')
-rw-r--r-- | contrib/ipfilter/tools/ipf.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/contrib/ipfilter/tools/ipf.c b/contrib/ipfilter/tools/ipf.c index c59bbed4..53c4c5a 100644 --- a/contrib/ipfilter/tools/ipf.c +++ b/contrib/ipfilter/tools/ipf.c @@ -453,15 +453,21 @@ void ipf_frsync() void zerostats() { + ipfobj_t obj; friostat_t fio; - friostat_t *fiop = &fio; + + obj.ipfo_rev = IPFILTER_VERSION; + obj.ipfo_type = IPFOBJ_IPFSTAT; + obj.ipfo_size = sizeof(fio); + obj.ipfo_ptr = &fio; + obj.ipfo_offset = 0; if (opendevice(ipfname, 1) != -2) { - if (ioctl(fd, SIOCFRZST, &fiop) == -1) { + if (ioctl(fd, SIOCFRZST, &obj) == -1) { perror("ioctl(SIOCFRZST)"); exit(-1); } - showstats(fiop); + showstats(&fio); } } |