summaryrefslogtreecommitdiffstats
path: root/src/libnftables.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-07-10 10:45:17 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2023-07-10 18:21:19 +0200
commit1b25d18019260527f1e2fa259aa9bb51ad1a1ef0 (patch)
treeb428e9fa825cd416ead633a661c939886c844d86 /src/libnftables.c
parent057f5ffe7dd500a379ca882cfec699d52bfa40a1 (diff)
libnftables: drop unused argument nf_sock from nft_netlink()
Signed-off-by: Thomas Haller <thaller@redhat.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/libnftables.c')
-rw-r--r--src/libnftables.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libnftables.c b/src/libnftables.c
index 57e0fc77..5b3eb2dc 100644
--- a/src/libnftables.c
+++ b/src/libnftables.c
@@ -17,8 +17,7 @@
#include <string.h>
static int nft_netlink(struct nft_ctx *nft,
- struct list_head *cmds, struct list_head *msgs,
- struct mnl_socket *nf_sock)
+ struct list_head *cmds, struct list_head *msgs)
{
uint32_t batch_seqnum, seqnum = 0, last_seqnum = UINT32_MAX, num_cmds = 0;
struct netlink_ctx ctx = {
@@ -595,7 +594,7 @@ int nft_run_cmd_from_buffer(struct nft_ctx *nft, const char *buf)
goto err;
}
- if (nft_netlink(nft, &cmds, &msgs, nft->nf_sock) != 0)
+ if (nft_netlink(nft, &cmds, &msgs) != 0)
rc = -1;
err:
erec_print_list(&nft->output, &msgs, nft->debug_mask);
@@ -691,7 +690,7 @@ static int __nft_run_cmd_from_filename(struct nft_ctx *nft, const char *filename
goto err;
}
- if (nft_netlink(nft, &cmds, &msgs, nft->nf_sock) != 0)
+ if (nft_netlink(nft, &cmds, &msgs) != 0)
rc = -1;
err:
erec_print_list(&nft->output, &msgs, nft->debug_mask);