]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
libnftables: drop unused argument nf_sock from nft_netlink()
authorThomas Haller <thaller@redhat.com>
Mon, 10 Jul 2023 08:45:17 +0000 (10:45 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 10 Jul 2023 16:21:19 +0000 (18:21 +0200)
Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/libnftables.c

index 57e0fc77f989b2100533a70d6c40e522d5ec46ad..5b3eb2dc3df487f258cd73402ee37c181d901a2f 100644 (file)
@@ -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);