* [PATCH] Not printing "nft" in iptables-restore-translate command
@ 2016-04-11 7:40 Guruswamy Basavaiah
2016-04-12 21:57 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Guruswamy Basavaiah @ 2016-04-11 7:40 UTC (permalink / raw)
To: netfilter-devel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Not printing "nft" in iptables-restore-translate command
2016-04-11 7:40 [PATCH] Not printing "nft" in iptables-restore-translate command Guruswamy Basavaiah
@ 2016-04-12 21:57 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2016-04-12 21:57 UTC (permalink / raw)
To: Guruswamy Basavaiah; +Cc: netfilter-devel
On Mon, Apr 11, 2016 at 01:10:33PM +0530, Guruswamy Basavaiah wrote:
> No need to print "nft" in function do_command_xlate,
> if the function is called from iptables-restore-translate command.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-12 21:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-11 7:40 [PATCH] Not printing "nft" in iptables-restore-translate command Guruswamy Basavaiah
2016-04-12 21:57 ` 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).