netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iptables-translate: Printing the table name before chain name
@ 2016-04-05  7:08 Guruswamy Basavaiah
  2016-04-07  9:50 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Guruswamy Basavaiah @ 2016-04-05  7:08 UTC (permalink / raw)
  To: netfilter-devel

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

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

diff --git a/iptables/xtables-translate.c b/iptables/xtables-translate.c
index 44162a2..07cc98c 100644
--- a/iptables/xtables-translate.c
+++ b/iptables/xtables-translate.c
@@ -296,7 +296,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;
 }

--
2.5.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iptables-translate: Printing the table name before chain name
  2016-04-05  7:08 [PATCH] iptables-translate: Printing the table name before chain name Guruswamy Basavaiah
@ 2016-04-07  9:50 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2016-04-07  9:50 UTC (permalink / raw)
  To: Guruswamy Basavaiah; +Cc: netfilter-devel

On Tue, Apr 05, 2016 at 12:38:37PM +0530, Guruswamy Basavaiah wrote:
> 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

I want to take this fix, but it doesn't apply:

$ git am /tmp/iptables-translate-Printing-the-table-name-before-chain-name.patch -s
Applying: iptables-translate: Printing the table name before chain name
error: patch failed: iptables/xtables-translate.c:296
error: iptables/xtables-translate.c: patch does not apply
Patch failed at 0001 iptables-translate: Printing the table name before chain name
The copy of the patch that failed is found in:
   /home/pablo/devel/scm/git-netfilter/iptables/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-07  9:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-05  7:08 [PATCH] iptables-translate: Printing the table name before chain name Guruswamy Basavaiah
2016-04-07  9:50 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).