summaryrefslogtreecommitdiffstats
path: root/src/parser_bison.y
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2020-03-31 20:27:52 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2020-03-31 20:28:42 +0200
commit9b753e35b2e31521d23b20eac51d41a9383ed575 (patch)
treeac4c75e93066317f617fd6e9f21c2d9cae488358 /src/parser_bison.y
parent6428601937f8389eac17496f00f81276cad285f3 (diff)
parser_bison: simplify error in chain type and hook
Remove extra string after error, location is sufficient. # nft -f x /tmp/x:3:8-11: Error: unknown chain type type nput hook input device eth0 priority 0 ^^^^ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r--src/parser_bison.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 735f2dff..3e8d6bd6 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -1880,7 +1880,7 @@ flowtable_block : /* empty */ { $$ = $<flowtable>-1; }
$$->hook.loc = @3;
$$->hook.name = chain_hookname_lookup($3);
if ($$->hook.name == NULL) {
- erec_queue(error(&@3, "unknown chain hook %s", $3),
+ erec_queue(error(&@3, "unknown chain hook"),
state->msgs);
xfree($3);
YYERROR;
@@ -2049,7 +2049,7 @@ hook_spec : TYPE STRING HOOK STRING dev_spec prio_spec
const char *chain_type = chain_type_name_lookup($2);
if (chain_type == NULL) {
- erec_queue(error(&@2, "unknown chain type %s", $2),
+ erec_queue(error(&@2, "unknown chain type"),
state->msgs);
xfree($2);
YYERROR;
@@ -2061,7 +2061,7 @@ hook_spec : TYPE STRING HOOK STRING dev_spec prio_spec
$<chain>0->hook.loc = @4;
$<chain>0->hook.name = chain_hookname_lookup($4);
if ($<chain>0->hook.name == NULL) {
- erec_queue(error(&@4, "unknown chain hook %s", $4),
+ erec_queue(error(&@4, "unknown chain hook"),
state->msgs);
xfree($4);
YYERROR;