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/exthdr.c | |
parent | b076d6c6376a77fa84aa813bf267628820bcc883 (diff) |
expr: add support for cloning expressions
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/exthdr.c')
-rw-r--r-- | src/exthdr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/exthdr.c b/src/exthdr.c index 2defc7cb..718979a5 100644 --- a/src/exthdr.c +++ b/src/exthdr.c @@ -27,10 +27,17 @@ static void exthdr_expr_print(const struct expr *expr) printf("%s %s", expr->exthdr.desc->name, expr->exthdr.tmpl->token); } +static void exthdr_expr_clone(struct expr *new, const struct expr *expr) +{ + new->exthdr.desc = expr->exthdr.desc; + new->exthdr.tmpl = expr->exthdr.tmpl; +} + static const struct expr_ops exthdr_expr_ops = { .type = EXPR_EXTHDR, .name = "exthdr", .print = exthdr_expr_print, + .clone = exthdr_expr_clone, }; static const struct payload_template exthdr_unknown_template = |