summaryrefslogtreecommitdiffstats
path: root/src/expression.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2009-03-20 08:34:59 +0100
committerPatrick McHardy <kaber@trash.net>2009-03-20 08:34:59 +0100
commit878cc0e4e863e6b2c9fa71f791d35245b3ddbdb2 (patch)
treebd29fb4134cc513820af99f196671264b4c367dc /src/expression.c
parent5c40780440c0e8661fc7cfcec72dab48b934631d (diff)
Add support for user-defined symbolic constants
User-defined constants can be used like this: define allowed_hosts = { 192.168.0.0/24, 10.0.0.20-10.0.0.30 } define udp_services = domain define tcp_services = { ssh, domain } ip saddr $allowed_hosts udp dport $udp_services counter accept ip saddr $allowed_hosts tcp dport $tcp_services counter accept Recursive definitions are possible, but currently not fully handled. Anything requiring transformations (sets using ranges) can not be used more than once currently since the expressions need to be COW'ed previously. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/expression.c')
-rw-r--r--src/expression.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expression.c b/src/expression.c
index 66a8793f..4b3e1e04 100644
--- a/src/expression.c
+++ b/src/expression.c
@@ -162,7 +162,7 @@ struct expr *verdict_expr_alloc(const struct location *loc,
static void symbol_expr_print(const struct expr *expr)
{
- printf("%s", expr->identifier);
+ printf("%s%s", expr->scope != NULL ? "$" : "", expr->identifier);
}
static void symbol_expr_destroy(struct expr *expr)