summaryrefslogtreecommitdiff
path: root/sbin/pfctl/parse.y
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2005-01-28 17:29:32 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2005-01-28 17:29:32 +0000
commit012dda87a76677524ceb389435e2873db4dadfeb (patch)
tree4410ba7703c3d08c546b6c55aa9901a8beb37e29 /sbin/pfctl/parse.y
parentd379497698620b3e7baf1bc018a55d109d63b6d2 (diff)
add messages for syntax errors that caused silent failure before.
found by Peter Fraser, ok henning@
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r--sbin/pfctl/parse.y7
1 files changed, 6 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index f5fd8ac97bc..3efa0554e72 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.475 2005/01/27 15:30:35 dhartmei Exp $ */
+/* $OpenBSD: parse.y,v 1.476 2005/01/28 17:29:31 dhartmei Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -862,6 +862,8 @@ scrub_opt : NODF {
}
| REASSEMBLE STRING {
if (strcasecmp($2, "tcp") != 0) {
+ yyerror("scrub reassemble supports only tcp, "
+ "not '%s'", $2);
free($2);
YYERROR;
}
@@ -1067,6 +1069,7 @@ table_opt : STRING {
else if (!strcmp($1, "persist"))
table_opts.flags |= PFR_TFLAG_PERSIST;
else {
+ yyerror("invalid table option '%s'", $1);
free($1);
YYERROR;
}
@@ -3619,6 +3622,8 @@ yesno : NO { $$ = 0; }
if (!strcmp($1, "yes"))
$$ = 1;
else {
+ yyerror("invalid value '%s', expected 'yes' "
+ "or 'no'", $1);
free($1);
YYERROR;
}