summaryrefslogtreecommitdiffstats
path: root/src/netlink_delinearize.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2017-03-10 18:13:50 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2017-03-10 19:01:21 +0100
commit627be570eff8f05849614a257e6fa45c744f4dbd (patch)
treebf434417d7d862ab4ee74cb7f330729fa84149fc /src/netlink_delinearize.c
parent9fd9baba43c8ee17f944a1157b77a8e47cb9ba41 (diff)
exthdr: Add support for exthdr specific flags
This allows to have custom flags in exthdr expression, which is necessary for upcoming existence checks (of both IPv6 extension headers as well as TCP options). Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/netlink_delinearize.c')
-rw-r--r--src/netlink_delinearize.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
index 36e8fe3c..9ad1e2c6 100644
--- a/src/netlink_delinearize.c
+++ b/src/netlink_delinearize.c
@@ -498,9 +498,9 @@ static void netlink_parse_exthdr(struct netlink_parse_ctx *ctx,
const struct location *loc,
const struct nftnl_expr *nle)
{
+ uint32_t offset, len, flags;
enum nft_registers dreg;
enum nft_exthdr_op op;
- uint32_t offset, len;
uint8_t type;
struct expr *expr;
@@ -508,9 +508,10 @@ static void netlink_parse_exthdr(struct netlink_parse_ctx *ctx,
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 = nftnl_expr_get_u32(nle, NFTNL_EXPR_EXTHDR_OP);
+ flags = nftnl_expr_get_u32(nle, NFTNL_EXPR_EXTHDR_FLAGS);
expr = exthdr_expr_alloc(loc, NULL, 0);
- exthdr_init_raw(expr, type, offset, len, op);
+ exthdr_init_raw(expr, type, offset, len, op, flags);
dreg = netlink_parse_register(nle, NFTNL_EXPR_EXTHDR_DREG);
netlink_set_register(ctx, dreg, expr);