summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArturo Borrero <arturo.borrero.glez@gmail.com>2016-06-24 09:07:02 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-06-24 19:08:23 +0200
commit5ad0e626492e835fff65369c93d1e571013129e9 (patch)
treea109e55cbae304d8d4cf27d5e71df20e0d4cef0a /tests
parent3ec2592cd94a1e16ea1aadf6ff3632260deba600 (diff)
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 <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/nft-expr_lookup-test.c4
1 files changed, 4 insertions, 0 deletions
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);