diff options
author | Manuel Messner <mm@skelett.io> | 2017-02-07 03:14:10 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2017-02-12 15:34:47 +0100 |
commit | a0cecb3ea474ad24adefcc388267684f2fddd69d (patch) | |
tree | 1b02005826ff852c638fc29f1ee32d12eaeaa3e2 /src/netlink_delinearize.c | |
parent | 92632e23d96f56083fe77972be7fc5ee05a69d50 (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/netlink_delinearize.c')
-rw-r--r-- | src/netlink_delinearize.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c index 48968442..f21d2d56 100644 --- a/src/netlink_delinearize.c +++ b/src/netlink_delinearize.c @@ -499,6 +499,7 @@ static void netlink_parse_exthdr(struct netlink_parse_ctx *ctx, const struct nftnl_expr *nle) { enum nft_registers dreg; + enum nft_exthdr_op op; uint32_t offset, len; uint8_t type; struct expr *expr; @@ -506,9 +507,10 @@ static void netlink_parse_exthdr(struct netlink_parse_ctx *ctx, type = nftnl_expr_get_u8(nle, NFTNL_EXPR_EXTHDR_TYPE); offset = nftnl_expr_get_u32(nle, NFTNL_EXPR_EXTHDR_OFFSET) * BITS_PER_BYTE; len = nftnl_expr_get_u32(nle, NFTNL_EXPR_EXTHDR_LEN) * BITS_PER_BYTE; + op = NFT_EXTHDR_OP_IPV6; expr = exthdr_expr_alloc(loc, NULL, 0); - exthdr_init_raw(expr, type, offset, len); + exthdr_init_raw(expr, type, offset, len, op); dreg = netlink_parse_register(nle, NFTNL_EXPR_EXTHDR_DREG); netlink_set_register(ctx, dreg, expr); |