summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-03-27 16:11:56 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-03-27 16:11:56 +0000
commit73fe88af2c1fe1d7aa9bca9b448d309309d0475a (patch)
treee7f1f2cf92f21b08671af72c931072b5274c1a8c
parent055aec4798f15ab39598a97ec9d309698fe11472 (diff)
handle invalid priq/cbq flags better and give a nice error message
-rw-r--r--sbin/pfctl/parse.y10
1 files changed, 9 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 8580dce676b..c453a5b07d6 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.345 2003/03/27 15:58:11 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.346 2003/03/27 16:11:55 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -1039,6 +1039,10 @@ cbqflags_item : STRING {
$$ = CBQCLF_RED|CBQCLF_ECN;
else if (!strcmp($1, "rio"))
$$ = CBQCLF_RIO;
+ else {
+ yyerror("unknown cbq flag \"%s\"", $1);
+ YYERROR;
+ }
}
;
@@ -1055,6 +1059,10 @@ priqflags_item : STRING {
$$ = PRCF_RED|PRCF_ECN;
else if (!strcmp($1, "rio"))
$$ = PRCF_RIO;
+ else {
+ yyerror("unknown priq flag \"%s\"", $1);
+ YYERROR;
+ }
}
;