From 3cd9cd06625f8181c713489cec2c1ce6722a7e16 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 26 Feb 2014 00:27:36 +0100 Subject: src: fix wrong type in NFT_ATTR_*_FAMILY This fixes assertions in the test files. Signed-off-by: Pablo Neira Ayuso --- tests/nft-expr_exthdr-test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/nft-expr_exthdr-test.c') diff --git a/tests/nft-expr_exthdr-test.c b/tests/nft-expr_exthdr-test.c index a712903..c0dc609 100644 --- a/tests/nft-expr_exthdr-test.c +++ b/tests/nft-expr_exthdr-test.c @@ -33,8 +33,8 @@ static void cmp_nft_rule_expr(struct nft_rule_expr *rule_a, if (nft_rule_expr_get_u32(rule_a, NFT_EXPR_EXTHDR_DREG) != nft_rule_expr_get_u32(rule_b, NFT_EXPR_EXTHDR_DREG)) print_err("Expr NFT_EXPR_EXTHDR_DREG mismatches"); - if (nft_rule_expr_get_u8(rule_a, NFT_EXPR_EXTHDR_TYPE) != - nft_rule_expr_get_u8(rule_b, NFT_EXPR_EXTHDR_TYPE)) + if (nft_rule_expr_get_u32(rule_a, NFT_EXPR_EXTHDR_TYPE) != + nft_rule_expr_get_u32(rule_b, NFT_EXPR_EXTHDR_TYPE)) print_err("Expr NFT_EXPR_EXTHDR_TYPE mismatches"); if (nft_rule_expr_get_u32(rule_a, NFT_EXPR_EXTHDR_OFFSET) != nft_rule_expr_get_u32(rule_b, NFT_EXPR_EXTHDR_OFFSET)) @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) print_err("OOM"); nft_rule_expr_set_u32(ex, NFT_EXPR_EXTHDR_DREG, 0x12345678); - nft_rule_expr_set_u8(ex, NFT_EXPR_EXTHDR_TYPE, 0x12); + nft_rule_expr_set_u32(ex, NFT_EXPR_EXTHDR_TYPE, 0x12); nft_rule_expr_set_u32(ex, NFT_EXPR_EXTHDR_OFFSET, 0x12345678); nft_rule_expr_set_u32(ex, NFT_EXPR_EXTHDR_LEN, 0x12345678); -- cgit v1.2.3