netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH ulogd2 2/2] output: JSON: remove bogus check for host and port
Date: Mon,  3 Jan 2022 19:11:38 +0100	[thread overview]
Message-ID: <20220103181138.101880-2-pablo@netfilter.org> (raw)
In-Reply-To: <20220103181138.101880-1-pablo@netfilter.org>

struct config_entry already provides storage for the host and port
strings, .u.string is never NULL.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 output/ulogd_output_JSON.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/output/ulogd_output_JSON.c b/output/ulogd_output_JSON.c
index 83ad03efa145..bbc3dba5d41a 100644
--- a/output/ulogd_output_JSON.c
+++ b/output/ulogd_output_JSON.c
@@ -531,11 +531,6 @@ static int json_init_socket(struct ulogd_pluginstance *upi)
 {
 	struct json_priv *op = (struct json_priv *) &upi->private;
 
-	if (host_ce(upi->config_kset).u.string == NULL)
-		return -1;
-	if (port_ce(upi->config_kset).u.string == NULL)
-		return -1;
-
 	if (op->mode == JSON_MODE_UNIX &&
 	    validate_unix_socket(upi) < 0)
 		return -1;
-- 
2.30.2


      reply	other threads:[~2022-01-03 18:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-03 18:11 [PATCH ulogd2 1/2] output: JSON: fix possible truncation of socket path Pablo Neira Ayuso
2022-01-03 18:11 ` Pablo Neira Ayuso [this message]

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=20220103181138.101880-2-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --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).