summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 28ce1aa6..2320a826 100644
--- a/src/main.c
+++ b/src/main.c
@@ -26,6 +26,7 @@
#include <erec.h>
#include <mnl.h>
+unsigned int max_errors = 10;
unsigned int numeric_output;
unsigned int handle_output;
#ifdef DEBUG
@@ -219,7 +220,7 @@ int nft_run(void *scanner, struct parser_state *state, struct list_head *msgs)
int ret = 0;
ret = nft_parse(scanner, state);
- if (ret != 0)
+ if (ret != 0 || state->nerrs > 0)
return -1;
memset(&ctx, 0, sizeof(ctx));