]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
rule: reenable adjacent payload merging
authorPatrick McHardy <kaber@trash.net>
Sun, 9 Dec 2012 13:06:08 +0000 (14:06 +0100)
committerPatrick McHardy <kaber@trash.net>
Sun, 9 Dec 2012 14:17:27 +0000 (15:17 +0100)
Signed-off-by: Patrick McHardy <kaber@trash.net>
src/evaluate.c
src/rule.c

index 9e49e911a2e0ad34c0d02699e391875a63c21e55..01c6bd782a44f4bf11315ab7c91450dc01103aea 100644 (file)
@@ -1192,6 +1192,7 @@ static int set_evaluate(struct eval_ctx *ctx, struct set *set)
 static int rule_evaluate(struct eval_ctx *ctx, struct rule *rule)
 {
        struct stmt *stmt, *tstmt = NULL;
+       struct error_record *erec;
 
        payload_ctx_init(&ctx->pctx, rule->handle.family);
        memset(&ctx->ectx, 0, sizeof(ctx->ectx));
@@ -1208,6 +1209,13 @@ static int rule_evaluate(struct eval_ctx *ctx, struct rule *rule)
                if (stmt->flags & STMT_F_TERMINAL)
                        tstmt = stmt;
        }
+
+       erec = rule_postprocess(rule);
+       if (erec != NULL) {
+               erec_queue(erec, ctx->msgs);
+               return -1;
+       }
+
        return 0;
 }
 
index 9c3b62f790608b180f6c23dff9fd0588047e5359..61e16e755efc69da87ea51fe0ee8e0e9ff77d43a 100644 (file)
@@ -637,6 +637,5 @@ do_merge:
 struct error_record *rule_postprocess(struct rule *rule)
 {
        payload_try_merge(rule);
-       rule_print(rule);
        return NULL;
 }