[PATCH] redir: fix snprintf to return the number of bytes printed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Balazs Scheidler <balazs.scheidler@xxxxxxxxxxx>

This fixes --debug netlink output when a redir target is included.

Signed-off-by: Balazs Scheidler <balazs.scheidler@xxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux