diff mbox

redir: fix snprintf to return the number of bytes printed

Message ID 1435312673-32048-1-git-send-email-balazs.scheidler@balabit.com
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

balazs.scheidler@balabit.com June 26, 2015, 9:57 a.m. UTC
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(-)

Comments

Pablo Neira Ayuso June 30, 2015, 12:04 a.m. UTC | #1
On Fri, Jun 26, 2015 at 11:57:53AM +0200, balazs.scheidler@balabit.com wrote:
> From: Balazs Scheidler <balazs.scheidler@balabit.com>
> 
> This fixes --debug netlink output when a redir target is included.

Applied to libnftnl, thanks Balazs.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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