summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2022-11-30 10:31:52 +0100
committerPhil Sutter <phil@nwl.cc>2022-11-30 20:26:23 +0100
commit83604e7f7327b6b3197f98b4e579a2b88a4c7356 (patch)
treea6d3808c73531b172c112d590c8232417fdf9aeb /include
parent71e159f62451736f217792a7f8cfa8ab00add4d0 (diff)
xlate: get rid of escape_quotes
Its not necessary to escape " characters, we can let xtables-translate print the entire translation/command enclosed in '' chracters, i.e. nft 'add rule ...', this also takes care of [, { and other special characters that some shells might parse otherwise (when copy-pasting translated output). The escape_quotes struct member is retained to avoid an ABI breakage. This breaks all xlate test cases, fixup in followup patches. v3: no need to escape ', replace strcmp(x, "") with x[0] (Phil Sutter) Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'include')
-rw-r--r--include/xtables.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/xtables.h b/include/xtables.h
index dad1949e..4ffc8ec5 100644
--- a/include/xtables.h
+++ b/include/xtables.h
@@ -211,14 +211,14 @@ struct xt_xlate_mt_params {
const void *ip;
const struct xt_entry_match *match;
int numeric;
- bool escape_quotes;
+ bool escape_quotes; /* not used anymore, retained for ABI */
};
struct xt_xlate_tg_params {
const void *ip;
const struct xt_entry_target *target;
int numeric;
- bool escape_quotes;
+ bool escape_quotes; /* not used anymore, retained for ABI */
};
/* Include file for additions: new matches and targets. */