From 68c57e809f69108694cce2d502a3ed1c328d13e8 Mon Sep 17 00:00:00 2001 From: "Pablo M. Bermudo Garay" Date: Tue, 26 Jul 2016 18:45:24 +0200 Subject: xtables-translate: fix issue with quotes Some translations included escaped quotes when they were called from nft: $ sudo nft list ruleset table ip mangle { chain FORWARD { type filter hook forward priority -150; policy accept; ct helper \"ftp\" counter packets 0 bytes 0 ^^ ^^ } } This behavior is only correct when xlate functions are called from a xtables-translate command. This patch solves that issue using a new parameter (escape_quotes) in the xlate functions. Signed-off-by: Pablo M. Bermudo Garay Signed-off-by: Pablo Neira Ayuso --- include/xtables.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/xtables.h') diff --git a/include/xtables.h b/include/xtables.h index 73ab8256..e9bc3b7d 100644 --- a/include/xtables.h +++ b/include/xtables.h @@ -211,12 +211,14 @@ struct xt_xlate_mt_params { const void *ip; const struct xt_entry_match *match; int numeric; + bool escape_quotes; }; struct xt_xlate_tg_params { const void *ip; const struct xt_entry_target *target; int numeric; + bool escape_quotes; }; /* Include file for additions: new matches and targets. */ -- cgit v1.2.3