summaryrefslogtreecommitdiff
path: root/sbin/pfctl/parse.y
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-11-14 13:51:10 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-11-14 13:51:10 +0000
commitd6c1530015231325a381aabac30433d9d3f18330 (patch)
tree948c5324674a9990960029af561f8330c4a8d19d /sbin/pfctl/parse.y
parentd640f78aa8497e5da55736c2aea326363903f981 (diff)
allow the debuglevel to be set from pf.conf (set debug)
ok cedric@
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r--sbin/pfctl/parse.y13
1 files changed, 11 insertions, 2 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index de5ace0dc16..f2a17991b3e 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.421 2003/11/08 00:45:34 mcbride Exp $ */
+/* $OpenBSD: parse.y,v 1.422 2003/11/14 13:51:09 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -367,7 +367,7 @@ typedef struct {
%token NOROUTE FRAGMENT USER GROUP MAXMSS MAXIMUM TTL TOS DROP TABLE
%token REASSEMBLE FRAGDROP FRAGCROP ANCHOR NATANCHOR RDRANCHOR BINATANCHOR
%token SET OPTIMIZATION TIMEOUT LIMIT LOGINTERFACE BLOCKPOLICY RANDOMID
-%token REQUIREORDER SYNPROXY FINGERPRINTS NOSYNC
+%token REQUIREORDER SYNPROXY FINGERPRINTS NOSYNC DEBUG
%token ANTISPOOF FOR
%token BITMASK RANDOM SOURCEHASH ROUNDROBIN STATICPORT
%token ALTQ CBQ PRIQ HFSC BANDWIDTH TBRSIZE LINKSHARE REALTIME UPPERLIMIT
@@ -490,6 +490,14 @@ option : SET OPTIMIZATION STRING {
YYERROR;
}
}
+ | SET DEBUG STRING {
+ if (check_rulestate(PFCTL_STATE_OPTION))
+ YYERROR;
+ if (pfctl_set_debug(pf, $3) != 0) {
+ yyerror("error setting debuglevel %s", $3);
+ YYERROR;
+ }
+ }
;
string : string STRING {
@@ -3932,6 +3940,7 @@ lookup(char *s)
{ "cbq", CBQ},
{ "code", CODE},
{ "crop", FRAGCROP},
+ { "debug", DEBUG},
{ "drop", DROP},
{ "drop-ovl", FRAGDROP},
{ "dup-to", DUPTO},