diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-06-27 04:01:57 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-06-27 04:01:57 +0000 |
commit | a55912526d8fe00b03e174c91efad1ffd3acc331 (patch) | |
tree | 4c5ea80589cedf43bdc884bc9cc78044913b42f2 /sys | |
parent | 4cff6e802a837f7c9374ed0a82ade51a0d79035e (diff) |
remove unneccessary check in ioctl
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index c00fa4e4b8f..8fea13bcc4f 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.73 2001/06/27 03:47:01 dugsong Exp $ */ +/* $OpenBSD: pf.c,v 1.74 2001/06/27 04:01:56 deraadt Exp $ */ /* * Copyright (c) 2001, Daniel Hartmeier @@ -580,12 +580,6 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) if (!(flags & FWRITE)) return (EACCES); - if ((cmd != DIOCSTART) && (cmd != DIOCSTOP) && (cmd != DIOCCLRSTATES)) { - if (addr == NULL) { - return (EINVAL); - } - } - switch (cmd) { case DIOCSTART: @@ -593,6 +587,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) error = EEXIST; else { u_int32_t states = pf_status.states; + bzero(&pf_status, sizeof(struct pf_status)); pf_status.running = 1; pf_status.states = states; |