iptables-translate: Moving of printing nft back to xtables_xlate_main
PATCH 1/1 iptables-translate: Moving of printing nft back to xtables_xlate_main
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(-)
iptables/xtables-translate.c +1 -1
@@ -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" );
Signature · 1 line
2.5.0
Pablo Neira Ayuso
maintainerQuoted 5 lines · Guruswamy Basavaiah
Moving of printing "nft" back to
xtables_xlate_mainfrom
functiondo_command_xlate.This reverts of previous commit
4f75601d37349c5a983a969d46c1ff0604991b5cwhich was breaking "iptables-restore-translate -f" and "./nft -f"
Instead of reverting, you can probably check:
if (!restore)
printf("nft ");so the nft keyword is not shown via iptables-restore-translate.