netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Haller <thaller@redhat.com>
To: NetFilter <netfilter-devel@vger.kernel.org>
Cc: Thomas Haller <thaller@redhat.com>
Subject: [nft PATCH 2/4] libnftables: drop unused argument nf_sock from nft_netlink()
Date: Mon, 10 Jul 2023 10:45:17 +0200	[thread overview]
Message-ID: <20230710084926.172198-3-thaller@redhat.com> (raw)
In-Reply-To: <20230710084926.172198-1-thaller@redhat.com>

Signed-off-by: Thomas Haller <thaller@redhat.com>
---
 src/libnftables.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/libnftables.c b/src/libnftables.c
index 57e0fc77f989..5b3eb2dc3df4 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);
-- 
2.41.0


  parent reply	other threads:[~2023-07-10  8:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10  8:45 [nft PATCH 0/4] libnftables: minor cleanups initalizing nf_sock instance of nft_ctx Thomas Haller
2023-07-10  8:45 ` [nft PATCH 1/4] libnftables: always initialize netlink socket in nft_ctx_new() Thomas Haller
2023-07-10  8:45 ` Thomas Haller [this message]
2023-07-10  8:45 ` [nft PATCH 3/4] libnftables: inline creation of nf_sock " Thomas Haller
2023-07-10  8:45 ` [nft PATCH 4/4] libnftables: drop check for nf_sock in nft_ctx_free() Thomas Haller
2023-07-10 16:22 ` [nft PATCH 0/4] libnftables: minor cleanups initalizing nf_sock instance of nft_ctx Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230710084926.172198-3-thaller@redhat.com \
    --to=thaller@redhat.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).