path: root/include
diff options
authorPablo Neira Ayuso <>2016-08-15 13:14:18 +0200
committerPablo Neira Ayuso <>2016-08-18 03:14:08 +0200
commit788c986343bc24bd0272e8aa409121ffe51f1ef3 (patch)
tree42cf0210e9fce93e0a5a951f0012e891fa750b05 /include
parentddb1f1f8cdca2e0f70254a5adcc0291907503a36 (diff)
src: quote user-defined strings when used from rule selectors
The following selectors display strings using quotes: * meta iifname * meta oifname * meta ibriport * meta obriport However, the following do not: * meta oif * meta iif * meta skuid * meta skgid * meta iifgroup * meta oifgroup * meta rtclassid * ct label Given they refer to user-defined values, neither keywords nor internal built-in known values, let's quote the output of this. This patch modifies symbolic_constant_print() so we can signal this to indicate if the string needs to be quoted. Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include')
1 files changed, 1 insertions, 1 deletions
diff --git a/include/datatype.h b/include/datatype.h
index c7e110f5..3eb686e2 100644
--- a/include/datatype.h
+++ b/include/datatype.h
@@ -188,7 +188,7 @@ extern struct error_record *symbolic_constant_parse(const struct expr *sym,
const struct symbol_table *tbl,
struct expr **res);
extern void symbolic_constant_print(const struct symbol_table *tbl,
- const struct expr *expr);
+ const struct expr *expr, bool quotes);
extern void symbol_table_print(const struct symbol_table *tbl,
const struct datatype *dtype);