summaryrefslogtreecommitdiffstats
path: root/src/libnftables.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnftables.c')
-rw-r--r--src/libnftables.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libnftables.c b/src/libnftables.c
index f336dbc3..fe5143f6 100644
--- a/src/libnftables.c
+++ b/src/libnftables.c
@@ -46,8 +46,12 @@ static int nft_netlink(struct nft_ctx *nft,
ctx.debug_mask = nft->debug_mask;
init_list_head(&ctx.list);
ret = do_command(&ctx, cmd);
- if (ret < 0)
+ if (ret < 0) {
+ netlink_io_error(&ctx, &cmd->location,
+ "Could not process rule: %s",
+ strerror(errno));
goto out;
+ }
}
if (!nft->check)
mnl_batch_end(batch, mnl_seqnum_alloc(&seqnum));