libnftables: check for errors after evaluations
Pablo Neira Ayuso
maintainerPATCH 1/1 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 <[email protected]>
---
Sorry! I pushed out df2f746fb4cf too fast.
src/libnftables.c | 3 +++ 1 file changed, 3 insertions(+)
src/libnftables.c +3 -0
@@ -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);
Signature · 1 line
2.11.0