Skip to contentSkip to conversation

libnftables: check for errors after evaluations

PATCH New Pablo Neira Ayuso 1 participant 1 message Jun 7, 2019 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 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")

---
Sorry! I pushed out df2f746fb4cf too fast.

 src/libnftables.c | 3 +++
 1 file changed, 3 insertions(+)
src/libnftables.c +3 -0
index e9dc03cf2909..abd133bee127 100644
@@ -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