From a0cecb3ea474ad24adefcc388267684f2fddd69d Mon Sep 17 00:00:00 2001 From: Manuel Messner Date: Tue, 7 Feb 2017 03:14:10 +0100 Subject: 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 Reviewed-by: Florian Westphal Signed-off-by: Florian Westphal --- src/exthdr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/exthdr.c') 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) -- cgit v1.2.3