diff mbox

Printing the table name before chain name.

Message ID 1460057894-20466-1-git-send-email-guru2018@gmail.com
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Guruswamy Basavaiah April 7, 2016, 7:38 p.m. UTC
Command ./iptables-restore-translate, was printing
table name before the chain name for user added chains.
This is breaking ./nft -f command.

Before fix, output of "./iptables-restore-translate"
add chain ip OUTPUT_direct raw

After fix:
add chain ip raw OUTPUT_direct

Signed-off-by: Guruswamy Basavaiah <guru2018@gmail.com>
---
 iptables/xtables-translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pablo Neira Ayuso April 8, 2016, 10:24 a.m. UTC | #1
On Fri, Apr 08, 2016 at 01:08:14AM +0530, Guruswamy Basavaiah wrote:
> Command ./iptables-restore-translate, was printing
> table name before the chain name for user added chains.
> This is breaking ./nft -f command.
> 
> Before fix, output of "./iptables-restore-translate"
> add chain ip OUTPUT_direct raw
> 
> After fix:
> add chain ip raw OUTPUT_direct

Applied, thanks.
--
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/iptables/xtables-translate.c b/iptables/xtables-translate.c
index 354357c..0b2c0bf 100644
--- a/iptables/xtables-translate.c
+++ b/iptables/xtables-translate.c
@@ -297,7 +297,7 @@  static const struct option options[] = {
 static int xlate_chain_user_add(struct nft_handle *h, const char *chain,
 				const char *table)
 {
-	printf("add chain %s %s %s\n", family2str[h->family], chain, table);
+	printf("add chain %s %s %s\n", family2str[h->family], table, chain);
 	return 0;
 }