summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libnftables.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libnftables.c b/src/libnftables.c
index eae78e8b..e9dc03cf 100644
--- a/src/libnftables.c
+++ b/src/libnftables.c
@@ -393,7 +393,8 @@ static int nft_evaluate(struct nft_ctx *nft, struct list_head *msgs,
.nft = nft,
.msgs = msgs,
};
- if (cmd_evaluate(&ectx, cmd) < 0)
+ if (cmd_evaluate(&ectx, cmd) < 0 &&
+ ++nft->state->nerrs == nft->parser_max_errors)
return -1;
}