diff options
author | Florian Westphal <fw@strlen.de> | 2020-10-21 23:54:17 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2020-11-09 12:19:31 +0100 |
commit | 24d8da3083422da8336eeed2ee23b2ccf598ba5a (patch) | |
tree | aad5a98e023ca49a5db923ec8ad8c8899482bf57 /src/netlink_linearize.c | |
parent | 2e1f821d713aa44717b38901ee80cac8e2aa0335 (diff) |
tcpopt: allow to check for presence of any tcp option
nft currently doesn't allow to check for presence of arbitrary tcp options.
Only known options where nft provides a template can be tested for.
This allows to test for presence of raw protocol values as well.
Example:
tcp option 42 exists
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/netlink_linearize.c')
-rw-r--r-- | src/netlink_linearize.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netlink_linearize.c b/src/netlink_linearize.c index a37e4b94..05af8bb1 100644 --- a/src/netlink_linearize.c +++ b/src/netlink_linearize.c @@ -206,7 +206,7 @@ static void netlink_gen_exthdr(struct netlink_linearize_ctx *ctx, nle = alloc_nft_expr("exthdr"); netlink_put_register(nle, NFTNL_EXPR_EXTHDR_DREG, dreg); nftnl_expr_set_u8(nle, NFTNL_EXPR_EXTHDR_TYPE, - expr->exthdr.desc->type); + expr->exthdr.raw_type); nftnl_expr_set_u32(nle, NFTNL_EXPR_EXTHDR_OFFSET, offset / BITS_PER_BYTE); nftnl_expr_set_u32(nle, NFTNL_EXPR_EXTHDR_LEN, div_round_up(expr->len, BITS_PER_BYTE)); |