From 4ae0b6dc90d16b4d93a4e8b6703f23dcf2467b85 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Fri, 3 Feb 2017 15:22:28 +0100 Subject: statement: fix print of ip dnat address the change causes non-ipv6 addresses to not be printed at all in case a nfproto was given. Also add a test case to catch this. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1117 Fixes: 5ab0e10fc6e2c22363a ("src: support for RFC2732 IPv6 address format with brackets") Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso --- src/statement.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/statement.c') diff --git a/src/statement.c b/src/statement.c index 9cdabbb9..3beb86ab 100644 --- a/src/statement.c +++ b/src/statement.c @@ -508,6 +508,8 @@ static void nat_stmt_print(const struct stmt *stmt) printf("]-["); expr_print(stmt->nat.addr->right); printf("]"); + } else { + expr_print(stmt->nat.addr); } } else { expr_print(stmt->nat.addr); -- cgit v1.2.3