summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorEric Leblond <eric@regit.org>2017-08-24 17:07:37 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2017-08-24 19:20:31 +0200
commit5823568c8d605dbf4b258a807ed14a1c8367399e (patch)
treebecad01873a8bf945e989dd97073626e8a9b3979 /src/main.c
parentd4344bd829c00523b80f09bebf2a70c588b64c2a (diff)
mnl: fix error handling in mnl_batch_talk
If one of the command is failing we should return an error. Pablo says: "This is not a real issue since nft_netlink() returns an error in case the list of errors is not empty. But we can indeed simplify things by removing that explicit assignment in nft_netlink() so mnl_batch_talk() consistently reports when if an error has happened. Signee-off-by: Eric Leblond <eric@regit.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 21bd74aa..4abbdc06 100644
--- a/src/main.c
+++ b/src/main.c
@@ -220,7 +220,6 @@ static int nft_netlink(struct nft_ctx *nft,
netlink_io_error(&ctx, &cmd->location,
"Could not process rule: %s",
strerror(err->err));
- ret = -1;
errno = err->err;
if (err->seqnum == cmd->seqnum) {
mnl_err_list_free(err);