From 5ad0e626492e835fff65369c93d1e571013129e9 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Fri, 24 Jun 2016 09:07:02 +0200 Subject: expr: lookup: give support for inverted matching Inverted matching support was included in the kernel, let's give support here as well. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- tests/nft-expr_lookup-test.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/nft-expr_lookup-test.c b/tests/nft-expr_lookup-test.c index d3b45df..e52345f 100644 --- a/tests/nft-expr_lookup-test.c +++ b/tests/nft-expr_lookup-test.c @@ -39,6 +39,9 @@ static void cmp_nftnl_expr(struct nftnl_expr *rule_a, if (strcmp(nftnl_expr_get_str(rule_a, NFTNL_EXPR_LOOKUP_SET), nftnl_expr_get_str(rule_b, NFTNL_EXPR_LOOKUP_SET))) print_err("Expr NFTNL_EXPR_LOOKUP_SET mismatches"); + if (nftnl_expr_get_u32(rule_a, NFTNL_EXPR_LOOKUP_FLAGS) != + nftnl_expr_get_u32(rule_b, NFTNL_EXPR_LOOPUP_FLAGS)) + print_err("Expr NFTNL_EXPR_LOOkUP_FLAGS mismatches"); } int main(int argc, char *argv[]) @@ -63,6 +66,7 @@ int main(int argc, char *argv[]) nftnl_expr_set_u32(ex, NFTNL_EXPR_LOOKUP_DREG, 0x78123456); nftnl_expr_set(ex, NFTNL_EXPR_LOOKUP_SET, &lookup_set, sizeof(lookup_set)); + nftnl_expr_set_u32(ex, NFTNL_EXPR_LOOKUP_FLAGS, 0x12345678); nftnl_rule_add_expr(a, ex); -- cgit v1.2.3