From 788c986343bc24bd0272e8aa409121ffe51f1ef3 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 15 Aug 2016 13:14:18 +0200 Subject: 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 --- src/proto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/proto.c') diff --git a/src/proto.c b/src/proto.c index 4c12977c..94995f10 100644 --- a/src/proto.c +++ b/src/proto.c @@ -871,7 +871,7 @@ static const struct symbol_table ethertype_tbl = { static void ethertype_print(const struct expr *expr) { - return symbolic_constant_print(ðertype_tbl, expr); + return symbolic_constant_print(ðertype_tbl, expr, false); } const struct datatype ethertype_type = { -- cgit v1.2.3