Skip to contentSkip to conversation

Printing the table name before chain name.

PATCH Applied Guruswamy Basavaiah 2 participants 2 messages Apr 7, 2016 – Apr 8, 2016 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Printing the table name before chain name.

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

---
 iptables/xtables-translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
iptables/xtables-translate.c +1 -1
index 354357c..0b2c0bf 100644
@@ -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;
 }
 
Signature · 1 line
2.5.5
maintainer Applied
#1 lore raw
Quoted 9 lines · Guruswamy Basavaiah

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.