diff options
author | Kenjiro Cho <kjc@cvs.openbsd.org> | 2002-11-26 03:44:54 +0000 |
---|---|---|
committer | Kenjiro Cho <kjc@cvs.openbsd.org> | 2002-11-26 03:44:54 +0000 |
commit | dc367dedac6a4ec8a7f45b42f980a09fbb0b273e (patch) | |
tree | 4e6a475e03374726d910b1fb01cd1c37239e265e /sys/net | |
parent | f55b6e518fa1b9acbff743f75de0827f9eb89de8 (diff) |
fix "pfctl -Fq".
after altq gets flushed, altq forgot that it was enabled since
altq is actually detached with an empty ruleset.
so, add a variable, pfaltq_running, to remember the running state
and re-enable altq when a new ruleset is loaded.
noticed, tested, and oked by henning@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/pf_ioctl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index a58da9b12df..94b467816b3 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.18 2002/11/23 09:37:02 deraadt Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.19 2002/11/26 03:44:53 kjc Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1915,6 +1915,8 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) break; } } + if (error == 0) + pfaltq_running = 1; splx(s); DPFPRINTF(PF_DEBUG_MISC, ("altq: started\n")); break; @@ -1946,6 +1948,8 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) error = err; } } + if (error == 0) + pfaltq_running = 0; splx(s); DPFPRINTF(PF_DEBUG_MISC, ("altq: stopped\n")); break; |