summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2019-05-29 18:24:12 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-05-31 17:57:35 +0200
commite1fce27b4231e7f6172263abe34ad9b4f976ad5d (patch)
treec558c036b6056de369d5f4ca64ac297145a2ab4f /src
parentbbe851eb15b19992ce5cc42990a33fe22325a236 (diff)
mnl: call mnl_set_sndbuffer() from mnl_batch_talk()
Instead of mnl_nft_socket_sendmsg(), just a cleanup. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/mnl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mnl.c b/src/mnl.c
index 859c7d77..8a45e4c8 100644
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -276,7 +276,6 @@ static ssize_t mnl_nft_socket_sendmsg(const struct netlink_ctx *ctx)
};
uint32_t i;
- mnl_set_sndbuffer(ctx->nft->nf_sock, ctx->batch);
nftnl_batch_iovec(ctx->batch, iov, iov_len);
for (i = 0; i < iov_len; i++) {
@@ -302,6 +301,8 @@ int mnl_batch_talk(struct netlink_ctx *ctx, struct list_head *err_list)
};
int err = 0;
+ mnl_set_sndbuffer(ctx->nft->nf_sock, ctx->batch);
+
ret = mnl_nft_socket_sendmsg(ctx);
if (ret == -1)
return -1;