summaryrefslogtreecommitdiff
path: root/sbin/pfctl/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r--sbin/pfctl/parse.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index f087cbbccf9..221a669a556 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.375 2003/05/13 21:15:07 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.376 2003/05/13 23:02:15 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -2954,6 +2954,10 @@ filter_consistent(struct pf_rule *r)
yyerror("keep state on block rules doesn't make sense");
problems++;
}
+ if ((r->tagname[0] || r->match_tagname[0]) && !r->keep_state) {
+ yyerror("tags cannot be used without keep state");
+ problems++;
+ }
return (-problems);
}