From: Guruswamy Basavaiah <guru2018@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH] Not printing "nft" in iptables-restore-translate command
Date: Mon, 11 Apr 2016 13:10:33 +0530 [thread overview]
Message-ID: <1460360433-14709-1-git-send-email-guru2018@gmail.com> (raw)
No need to print "nft" in function do_command_xlate,
if the function is called from iptables-restore-translate command.
Signed-off-by: Guruswamy Basavaiah <guru2018@gmail.com>
---
iptables/xtables-translate.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/iptables/xtables-translate.c b/iptables/xtables-translate.c
index 0b2c0bf..1c64178 100644
--- a/iptables/xtables-translate.c
+++ b/iptables/xtables-translate.c
@@ -193,7 +193,9 @@ static int do_command_xlate(struct nft_handle *h, int argc, char *argv[],
do_parse(h, argc, argv, &p, &cs, &args);
- printf("nft ");
+ if (!restore) {
+ printf("nft ");
+ }
switch (p.command) {
case CMD_APPEND:
ret = 1;
--
2.5.5
next reply other threads:[~2016-04-11 7:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-11 7:40 Guruswamy Basavaiah [this message]
2016-04-12 21:57 ` [PATCH] Not printing "nft" in iptables-restore-translate command 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=1460360433-14709-1-git-send-email-guru2018@gmail.com \
--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 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).