From f1c2ace2631fa691b81a181bbbf2a3b29b0e69f6 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 23 Oct 2018 18:24:31 +0200 Subject: src: move socket open and reopen to mnl.c These functions are part of the mnl backend, move them there. Remove netlink_close_sock(), use direct call to mnl_socket_close(). Signed-off-by: Pablo Neira Ayuso --- src/libnftables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libnftables.c') diff --git a/src/libnftables.c b/src/libnftables.c index 44869602..0731c532 100644 --- a/src/libnftables.c +++ b/src/libnftables.c @@ -129,7 +129,7 @@ void nft_ctx_clear_include_paths(struct nft_ctx *ctx) static void nft_ctx_netlink_init(struct nft_ctx *ctx) { - ctx->nf_sock = netlink_open_sock(); + ctx->nf_sock = nft_mnl_socket_open(); } struct nft_ctx *nft_ctx_new(uint32_t flags) @@ -266,7 +266,7 @@ const char *nft_ctx_get_error_buffer(struct nft_ctx *ctx) void nft_ctx_free(struct nft_ctx *ctx) { if (ctx->nf_sock) - netlink_close_sock(ctx->nf_sock); + mnl_socket_close(ctx->nf_sock); exit_cookie(&ctx->output.output_cookie); exit_cookie(&ctx->output.error_cookie); -- cgit v1.2.3