diff options
author | Patrick McHardy <kaber@trash.net> | 2014-01-08 13:02:15 +0000 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2014-01-08 13:02:15 +0000 |
commit | 77ef4d83c8d030b183ff763605b2c3026545fc9c (patch) | |
tree | 8ad321d7a8d5f285d84f3873c75f65c408ec11be /src/netlink_delinearize.c | |
parent | 8f86606efe82489945db1706bd1d1a4d524afcad (diff) |
expr: add protocol context update callback
Add a callback function to the expression ops to update the protocol
context for relational protocol expressions (EXPR_F_PROTOCOL).
Also set the EXPR_F_PROTOCOL flag for IIFTYPE meta expressions to make
sure the callback is invoked when necessary.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/netlink_delinearize.c')
-rw-r--r-- | src/netlink_delinearize.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c index 982377f8..c02f133d 100644 --- a/src/netlink_delinearize.c +++ b/src/netlink_delinearize.c @@ -612,7 +612,7 @@ static void payload_match_postprocess(struct rule_pp_ctx *ctx, nexpr = relational_expr_alloc(&expr->location, expr->op, left, tmp); - payload_expr_pctx_update(&ctx->pctx, nexpr); + left->ops->pctx_update(&ctx->pctx, nexpr); nstmt = expr_stmt_alloc(&stmt->location, nexpr); list_add_tail(&nstmt->list, &stmt->list); @@ -644,7 +644,7 @@ static void meta_match_postprocess(struct proto_ctx *ctx, { switch (expr->op) { case OP_EQ: - meta_expr_pctx_update(ctx, expr); + expr->left->ops->pctx_update(ctx, expr); break; default: break; |