summaryrefslogtreecommitdiffstats
path: root/src/exthdr.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2016-03-02 13:56:43 +0100
committerFlorian Westphal <fw@strlen.de>2016-03-02 13:56:43 +0100
commit9f1918ad12d02cf3ba02e4a43879a2a284a8289e (patch)
tree71ace1a253157d486534c8ebcf32cbb6582e6e2e /src/exthdr.c
parent537d5d4cd09af5590ed0b5e6d2150de87b694824 (diff)
exthdr: store offset for later use
Its possible that we cannot find the template without also considering an implicit mask. For this we need to store the offset. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/exthdr.c')
-rw-r--r--src/exthdr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/exthdr.c b/src/exthdr.c
index 9ed0b6ac..512de0ae 100644
--- a/src/exthdr.c
+++ b/src/exthdr.c
@@ -37,6 +37,7 @@ static void exthdr_expr_clone(struct expr *new, const struct expr *expr)
{
new->exthdr.desc = expr->exthdr.desc;
new->exthdr.tmpl = expr->exthdr.tmpl;
+ new->exthdr.offset = expr->exthdr.offset;
}
static const struct expr_ops exthdr_expr_ops = {
@@ -86,6 +87,7 @@ void exthdr_init_raw(struct expr *expr, uint8_t type,
assert(expr->ops->type == EXPR_EXTHDR);
expr->len = len;
+ expr->exthdr.offset = offset;
expr->exthdr.desc = exthdr_protocols[type];
assert(expr->exthdr.desc != NULL);