From 72931553828af0ce85f0562b9ff8ec7f4d28e050 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Fri, 8 Feb 2019 17:02:22 +0100 Subject: src: expr: add expression etype Temporary kludge to remove all the expr->ops->type == ... patterns. Followup patch will remove expr->ops, and make expr_ops() lookup the correct expr_ops struct instead to reduce struct expr size. Signed-off-by: Florian Westphal --- src/exthdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/exthdr.c') diff --git a/src/exthdr.c b/src/exthdr.c index cb0a58e8..8f803be6 100644 --- a/src/exthdr.c +++ b/src/exthdr.c @@ -162,7 +162,7 @@ void exthdr_init_raw(struct expr *expr, uint8_t type, const struct proto_hdr_template *tmpl = &exthdr_unknown_template; unsigned int i; - assert(expr->ops->type == EXPR_EXTHDR); + assert(expr->etype == EXPR_EXTHDR); if (op == NFT_EXTHDR_OP_TCPOPT) return tcpopt_init_raw(expr, type, offset, len, flags); -- cgit v1.2.3