diff options
-rw-r--r-- | contrib/ipfilter/tools/ipf.c | 12 | ||||
-rw-r--r-- | sys/contrib/ipfilter/netinet/fil.c | 2 |
2 files changed, 10 insertions, 4 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); } } diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c index 703ff76..a13441c 100644 --- a/sys/contrib/ipfilter/netinet/fil.c +++ b/sys/contrib/ipfilter/netinet/fil.c @@ -6286,7 +6286,7 @@ caddr_t data; int error; fr_getstat(&fio); - error = copyoutptr(&fio, data, sizeof(fio)); + error = fr_outobj(data, &fio, IPFOBJ_IPFSTAT); if (error) return EFAULT; |