From: balazs.scheidler@balabit.com
To: netfilter-devel@vger.kernel.org
Cc: Balazs Scheidler <balazs.scheidler@balabit.com>
Subject: [PATCH] redir: fix snprintf to return the number of bytes printed
Date: Fri, 26 Jun 2015 11:57:53 +0200 [thread overview]
Message-ID: <1435312673-32048-1-git-send-email-balazs.scheidler@balabit.com> (raw)
From: Balazs Scheidler <balazs.scheidler@balabit.com>
This fixes --debug netlink output when a redir target is included.
Signed-off-by: Balazs Scheidler <balazs.scheidler@balabit.com>
---
src/expr/redir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/expr/redir.c b/src/expr/redir.c
index b6adf88..69bd94f 100644
--- a/src/expr/redir.c
+++ b/src/expr/redir.c
@@ -223,7 +223,7 @@ static int nft_rule_expr_redir_snprintf_default(char *buf, size_t len,
SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
}
- return 0;
+ return offset;
}
static int
--
2.1.0
next reply other threads:[~2015-06-26 9:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 9:57 balazs.scheidler [this message]
2015-06-30 0:04 ` [PATCH] redir: fix snprintf to return the number of bytes printed 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=1435312673-32048-1-git-send-email-balazs.scheidler@balabit.com \
--to=balazs.scheidler@balabit.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).