diff options
author | Patrick McHardy <kaber@trash.net> | 2009-03-20 16:12:18 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-03-20 16:12:18 +0100 |
commit | 1bd3b87687328e1e097ca69cf18f2f14abfa9782 (patch) | |
tree | 5da11e82f3b32151afec78f7d216a25a39d0c429 /src/ct.c | |
parent | b076d6c6376a77fa84aa813bf267628820bcc883 (diff) |
expr: add support for cloning expressions
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/ct.c')
-rw-r--r-- | src/ct.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -131,10 +131,16 @@ static void ct_expr_print(const struct expr *expr) printf("ct %s", ct_templates[expr->ct.key].token); } +static void ct_expr_clone(struct expr *new, const struct expr *expr) +{ + new->ct.key = expr->ct.key; +} + static const struct expr_ops ct_expr_ops = { .type = EXPR_CT, .name = "ct", .print = ct_expr_print, + .clone = ct_expr_clone, }; struct expr *ct_expr_alloc(const struct location *loc, enum nft_ct_keys key) |