From: Pablo Neira Ayuso Date: Fri, 7 Jun 2019 12:20:48 +0000 (+0200) Subject: libnftables: check for errors after evaluations X-Git-Tag: v0.9.1~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1073a04697ec69b419bfb6601184f8e94509a6d;p=thirdparty%2Fnftables.git libnftables: check for errors after evaluations Check for state->nerrs after evaluation to restore error reporting when evaluation fails. Fixes: df2f746fb4cf ("libnftables: keep evaluating until parser_max_errors") Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/libnftables.c b/src/libnftables.c index e9dc03cf..abd133be 100644 --- a/src/libnftables.c +++ b/src/libnftables.c @@ -398,6 +398,9 @@ static int nft_evaluate(struct nft_ctx *nft, struct list_head *msgs, return -1; } + if (nft->state->nerrs) + return -1; + list_for_each_entry(cmd, cmds, list) nft_cmd_expand(cmd);