From: Jeremy Sowden <jeremy@azazel.net>
To: Jan Engelhardt <jengelh@inai.de>
Cc: Netfilter Devel <netfilter-devel@vger.kernel.org>
Subject: [PATCH xtables-addons v2 06/13] pknock: pknlusr: use macro to define inet_ntop buffer size.
Date: Sun, 25 Oct 2020 13:15:52 +0000 [thread overview]
Message-ID: <20201025131559.920038-8-jeremy@azazel.net> (raw)
In-Reply-To: <20201025131559.920038-1-jeremy@azazel.net>
POSIX provides a macro to define the minimum length required, so let's
use it.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
extensions/pknock/pknlusr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/extensions/pknock/pknlusr.c b/extensions/pknock/pknlusr.c
index 252fd42ffecd..9f11250510a1 100644
--- a/extensions/pknock/pknlusr.c
+++ b/extensions/pknock/pknlusr.c
@@ -53,7 +53,7 @@ int main(void)
while(1) {
const char *ip;
- char ipbuf[48];
+ char ipbuf[INET_ADDRSTRLEN];
memset(nlmsg, 0, nlmsg_size);
--
2.28.0
next prev parent reply other threads:[~2020-10-25 13:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-25 13:15 [PATCH xtables-addons v2 00/13] pknlusr improvements Jeremy Sowden
2020-10-25 13:15 ` Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 01/13] pknock: pknlusr: ensure man-page is included by `make dist` Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 02/13] pknock: pknlusr: remove dest_addr and rename src_addr Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 03/13] pknock: pknlusr: tighten up variable scopes Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 04/13] pknock: pknlusr: tidy up initialization of local address Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 05/13] pknock: pknlusr: use NLMSG macros and proper types, rather than arithmetic on char pointers Jeremy Sowden
2020-10-25 13:15 ` Jeremy Sowden [this message]
2020-10-25 13:15 ` [PATCH xtables-addons v2 07/13] pknock: pknlusr: don't treat recv return value of zero as an error Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 08/13] pknock: pknlusr: always close socket Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 09/13] pknock: pknlusr: fix hard-coded netlink multicast group ID Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 10/13] pknock: xt_pknock: use IS_ENABLED Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 11/13] pknock: xt_pknock: use kzalloc Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 12/13] pknock: xt_pknock: use `pr_err` Jeremy Sowden
2020-10-25 13:15 ` [PATCH xtables-addons v2 13/13] pknock: xt_pknock: remove DEBUG definition and disable debug output Jeremy Sowden
2020-10-25 14:18 ` [PATCH xtables-addons v2 00/13] pknlusr improvements Jan Engelhardt
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=20201025131559.920038-8-jeremy@azazel.net \
--to=jeremy@azazel.net \
--cc=jengelh@inai.de \
--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).