From 19047a85ede4ee90a5c8eaf64f320d9e10971f41 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Thu, 9 Jul 2009 23:52:26 +0000 Subject: 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 --- sbin/pfctl/pfctl.c | 13 ++++++++++--- 1 file 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) { -- cgit v1.2.3