All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guruswamy Basavaiah <guru2018@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH] iptables-translate: Moving of printing nft back to xtables_xlate_main
Date: Fri, 1 Apr 2016 00:06:24 +0530	[thread overview]
Message-ID: <20160331183624.GA7030@localhost.localdomain> (raw)

Moving of printing "nft" back to xtables_xlate_main from
 function do_command_xlate.

This reverts of previous commit 4f75601d37349c5a983a969d46c1ff0604991b5c
which was breaking "iptables-restore-translate -f" and "./nft -f"
---
 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 354357c..44162a2 100644
--- a/iptables/xtables-translate.c
+++ b/iptables/xtables-translate.c
@@ -193,7 +193,6 @@ static int do_command_xlate(struct nft_handle *h, int argc, char *argv[],
 
 	do_parse(h, argc, argv, &p, &cs, &args);
 
-	printf("nft ");
 	switch (p.command) {
 	case CMD_APPEND:
 		ret = 1;
@@ -370,6 +369,7 @@ static int xtables_xlate_main(int family, const char *progname, int argc,
 		exit(EXIT_FAILURE);
 	}
 
+	printf("nft ");
 	ret = do_command_xlate(&h, argc, argv, &table, false);
 	if (!ret)
 		fprintf(stderr, "Translation not implemented\n");
-- 
2.5.0


             reply	other threads:[~2016-03-31 18:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-31 18:36 Guruswamy Basavaiah [this message]
2016-04-07  9:51 ` [PATCH] iptables-translate: Moving of printing nft back to xtables_xlate_main Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160331183624.GA7030@localhost.localdomain \
    --to=guru2018@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.