summaryrefslogtreecommitdiffstats
path: root/src/libnftables.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnftables.c')
-rw-r--r--src/libnftables.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libnftables.c b/src/libnftables.c
index a58b8ca9..d8de89ca 100644
--- a/src/libnftables.c
+++ b/src/libnftables.c
@@ -58,6 +58,14 @@ static int nft_netlink(struct nft_ctx *nft,
goto out;
ret = mnl_batch_talk(&ctx, &err_list, num_cmds);
+ if (ret < 0) {
+ netlink_io_error(&ctx, NULL,
+ "Could not process rule: %s", strerror(errno));
+ goto out;
+ }
+
+ if (!list_empty(&err_list))
+ ret = -1;
list_for_each_entry_safe(err, tmp, &err_list, head) {
list_for_each_entry(cmd, cmds, list) {