From 8bba88809664abe72b8e1b8520584235ae156eb2 Mon Sep 17 00:00:00 2001 From: Guruswamy Basavaiah Date: Mon, 11 Apr 2016 13:10:33 +0530 Subject: iptables-translate: Don't print "nft" in iptables-restore-translate command 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 Signed-off-by: Pablo Neira Ayuso --- 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 0b2c0bf5..3f3a3c70 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; -- cgit v1.2.3