summaryrefslogtreecommitdiffstats
path: root/tests/nft-expr_hash-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nft-expr_hash-test.c')
-rw-r--r--tests/nft-expr_hash-test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/nft-expr_hash-test.c b/tests/nft-expr_hash-test.c
index d928234..7be6e9e 100644
--- a/tests/nft-expr_hash-test.c
+++ b/tests/nft-expr_hash-test.c
@@ -45,6 +45,9 @@ static void cmp_nftnl_expr(struct nftnl_expr *rule_a,
if (nftnl_expr_get_u32(rule_a, NFTNL_EXPR_HASH_OFFSET) !=
nftnl_expr_get_u32(rule_b, NFTNL_EXPR_HASH_OFFSET))
print_err("Expr NFTNL_EXPR_HASH_OFFSET mismatches");
+ if (nftnl_expr_get_u32(rule_a, NFTNL_EXPR_HASH_TYPE) !=
+ nftnl_expr_get_u32(rule_b, NFTNL_EXPR_HASH_TYPE))
+ print_err("Expr NFTNL_EXPR_HASH_TYPE mismatches");
}
int main(int argc, char *argv[])
@@ -69,6 +72,7 @@ int main(int argc, char *argv[])
nftnl_expr_set_u32(ex, NFTNL_EXPR_HASH_MODULUS, 0x78123456);
nftnl_expr_set_u32(ex, NFTNL_EXPR_HASH_SEED, 0x78123456);
nftnl_expr_set_u32(ex, NFTNL_EXPR_HASH_OFFSET, 0x3612845);
+ nftnl_expr_set_u32(ex, NFTNL_EXPR_HASH_TYPE, NFT_HASH_JENKINS);
nftnl_rule_add_expr(a, ex);