From b0769dbc2507551f4526c8965060598b757d4df7 Mon Sep 17 00:00:00 2001 From: Peter Stromberg Date: Tue, 31 Jul 2001 09:02:19 +0000 Subject: allow to test that flags are unset, ok dhartmei@, mickey@ --- sbin/pfctl/parse.y | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sbin') 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; } -- cgit v1.2.3