summaryrefslogtreecommitdiffstats
path: root/src/exthdr.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2019-02-08 17:02:22 +0100
committerFlorian Westphal <fw@strlen.de>2019-02-08 21:22:51 +0100
commit72931553828af0ce85f0562b9ff8ec7f4d28e050 (patch)
tree6fe42e2a99febc3ff783f63b8219de81215cf0d3 /src/exthdr.c
parent2cc91e6198e7ee8b9d0f8727c67a849fec393cd0 (diff)
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 <fw@strlen.de>
Diffstat (limited to 'src/exthdr.c')
-rw-r--r--src/exthdr.c2
1 files changed, 1 insertions, 1 deletions
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);