summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorPeter Stromberg <wilfried@cvs.openbsd.org>2001-07-31 09:02:19 +0000
committerPeter Stromberg <wilfried@cvs.openbsd.org>2001-07-31 09:02:19 +0000
commitb0769dbc2507551f4526c8965060598b757d4df7 (patch)
treec890810de9bc46211229e1fd2596a0c2c520d66f /sbin
parent1551f2bd8b7cc0a52785e59576213c36084939f3 (diff)
allow to test that flags are unset, ok dhartmei@, mickey@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pfctl/parse.y12
1 files changed, 11 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 221c0705ae7..5fa56e07d2a 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.15 2001/07/19 00:07:36 krw Exp $ */
+/* $OpenBSD: parse.y,v 1.16 2001/07/31 09:02:18 wilfried Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -355,6 +355,16 @@ flags: { $$.b1 = 0; $$.b2 = 0; }
}
$$.b2 = f;
}
+ | FLAGS "/" STRING {
+ int f;
+
+ $$.b1 = 0;
+ if ((f = parse_flags($3)) < 0) {
+ warnx("line %d: bad flags %s", lineno, $3);
+ YYERROR;
+ }
+ $$.b2 = f;
+ }
;
icmpspec: { $$.b1 = 0; $$.b2 = 0; }