diff options
author | Kjell Wooding <kjell@cvs.openbsd.org> | 2001-06-27 10:31:52 +0000 |
---|---|---|
committer | Kjell Wooding <kjell@cvs.openbsd.org> | 2001-06-27 10:31:52 +0000 |
commit | 1af4743896368d72b37729fb509c340856465816 (patch) | |
tree | 135ce5b80dfc7230b98001235cbc2e4c11bded46 /sys/net/pf.c | |
parent | 448bece5da7e46a44180845c85ee979221134c31 (diff) |
add -z flag for zeroing statistics. -s status no longer resets anything
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r-- | sys/net/pf.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index 811f4467aa0..8b62c34a703 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.76 2001/06/27 10:27:43 kjell Exp $ */ +/* $OpenBSD: pf.c,v 1.77 2001/06/27 10:31:51 kjell Exp $ */ /* * Copyright (c) 2001, Daniel Hartmeier @@ -962,18 +962,16 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) case DIOCGETSTATUS: { struct pf_status *s = (struct pf_status *)addr; + bcopy(&pf_status, s, sizeof(struct pf_status)); + break; + } + + case DIOCCLRSTATUS: { u_int8_t running = pf_status.running; u_int32_t states = pf_status.states; - - bcopy(&pf_status, s, sizeof(struct pf_status)); - if (s->since) - s->since = pftv.tv_sec - s->since; - else - s->since = 0; bzero(&pf_status, sizeof(struct pf_status)); pf_status.running = running; pf_status.states = states; - pf_status.since = pftv.tv_sec; break; } |