summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2009-07-09 23:52:26 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2009-07-09 23:52:26 +0000
commit19047a85ede4ee90a5c8eaf64f320d9e10971f41 (patch)
treec12339a057e3e0bca9429b26b7fb0e1e5c2f760f
parentf29e43207de6cf23477e1b303569d567c36b7864 (diff)
repair -x
since all this stuff is transactional now we need to wrap that into DIOCXBEGIN/COMMIT. bad henning forgot to commit this chunk at c2k9
-rw-r--r--sbin/pfctl/pfctl.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index c74895afb2c..410bc6b0f80 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl.c,v 1.282 2009/04/16 04:40:19 david Exp $ */
+/* $OpenBSD: pfctl.c,v 1.283 2009/07/09 23:52:25 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -1900,8 +1900,15 @@ pfctl_set_interface_flags(struct pfctl *pf, char *ifname, int flags, int how)
void
pfctl_debug(int dev, u_int32_t level, int opts)
{
- if (ioctl(dev, DIOCSETDEBUG, &level))
- err(1, "DIOCSETDEBUG");
+ struct pfr_buffer t;
+
+ memset(&t, 0, sizeof(t));
+ t.pfrb_type = PFRB_TRANS;
+ if (pfctl_trans(dev, &t, DIOCXBEGIN, 0) ||
+ ioctl(dev, DIOCSETDEBUG, &level) ||
+ pfctl_trans(dev, &t, DIOCXCOMMIT, 0))
+ err(1, "pfctl_debug ioctl");
+
if ((opts & PF_OPT_QUIET) == 0) {
fprintf(stderr, "debug level set to '");
switch (level) {