Instead of mnl_nft_socket_sendmsg(), just a cleanup.

Signed-off-by: Pablo Neira Ayuso <pa...@netfilter.org>
---
 src/mnl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mnl.c b/src/mnl.c
index 288a887df097..e623a1adccfc 100644
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -265,7 +265,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++) {
@@ -291,6 +290,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;
-- 
2.11.0

Reply via email to