summaryrefslogtreecommitdiffstats
path: root/src/exthdr.c
diff options
context:
space:
mode:
authorManuel Messner <mm@skelett.io>2017-02-07 03:14:10 +0100
committerFlorian Westphal <fw@strlen.de>2017-02-12 15:34:47 +0100
commita0cecb3ea474ad24adefcc388267684f2fddd69d (patch)
tree1b02005826ff852c638fc29f1ee32d12eaeaa3e2 /src/exthdr.c
parent92632e23d96f56083fe77972be7fc5ee05a69d50 (diff)
exthdr: prepare for tcp support
right now exthdr only deals with ipv6 extension headers, followup patch will enable tcp option matching. This adds the 'op' arg to exthdr_init. Signed-off-by: Manuel Messner <mm@skelett.io> Reviewed-by: Florian Westphal <fw@strlen.de> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/exthdr.c')
-rw-r--r--src/exthdr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/exthdr.c b/src/exthdr.c
index c641d4a3..45b1b690 100644
--- a/src/exthdr.c
+++ b/src/exthdr.c
@@ -79,7 +79,8 @@ static const struct exthdr_desc *exthdr_protocols[IPPROTO_MAX] = {
};
void exthdr_init_raw(struct expr *expr, uint8_t type,
- unsigned int offset, unsigned int len)
+ unsigned int offset, unsigned int len,
+ enum nft_exthdr_op op)
{
const struct proto_hdr_template *tmpl;
unsigned int i;
@@ -123,7 +124,7 @@ bool exthdr_find_template(struct expr *expr, const struct expr *mask, unsigned i
off += round_up(mask->len, BITS_PER_BYTE) - mask_len;
exthdr_init_raw(expr, expr->exthdr.desc->type,
- off, mask_len - mask_offset);
+ off, mask_len - mask_offset, NFT_EXTHDR_OP_IPV6);
/* still failed to find a template... Bug. */
if (expr->exthdr.tmpl == &exthdr_unknown_template)