Skip to contentSkip to conversation

redir: fix snprintf to return the number of bytes printed

PATCH Applied [email protected] 2 participants 2 messages Jun 26, 2015 – Jun 29, 2015 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 redir: fix snprintf to return the number of bytes printed

From: Balazs Scheidler <[email protected]>

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

---
 src/expr/redir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/expr/redir.c +1 -1
index b6adf88..69bd94f 100644
@@ -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
Signature · 1 line
2.1.0