diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-02-26 00:27:36 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-02-27 10:35:08 +0100 |
commit | 3cd9cd06625f8181c713489cec2c1ce6722a7e16 (patch) | |
tree | 67d5edbce74547fa01f6dd3a8b4021b39614c121 /tests/nft-chain-test.c | |
parent | 53c0ff324598ce2926236c32b2b4c858a0b3831a (diff) |
src: fix wrong type in NFT_ATTR_*_FAMILY
This fixes assertions in the test files.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/nft-chain-test.c')
-rw-r--r-- | tests/nft-chain-test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/nft-chain-test.c b/tests/nft-chain-test.c index 125562a..1ff8334 100644 --- a/tests/nft-chain-test.c +++ b/tests/nft-chain-test.c @@ -32,8 +32,8 @@ static void cmp_nft_chain(struct nft_chain *a, struct nft_chain *b) if (strcmp(nft_chain_attr_get_str(a, NFT_CHAIN_ATTR_TABLE), nft_chain_attr_get_str(b, NFT_CHAIN_ATTR_TABLE)) != 0) print_err("Chain table mismatches"); - if (nft_chain_attr_get_u8(a, NFT_CHAIN_ATTR_FAMILY) != - nft_chain_attr_get_u8(b, NFT_CHAIN_ATTR_FAMILY)) + if (nft_chain_attr_get_u32(a, NFT_CHAIN_ATTR_FAMILY) != + nft_chain_attr_get_u32(b, NFT_CHAIN_ATTR_FAMILY)) print_err("Chain family mismatches"); if (nft_chain_attr_get_u32(a, NFT_CHAIN_ATTR_POLICY) != nft_chain_attr_get_u32(b, NFT_CHAIN_ATTR_POLICY)) @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) print_err("OOM"); nft_chain_attr_set_str(a, NFT_CHAIN_ATTR_NAME, "test"); - nft_chain_attr_set_u8(a, NFT_CHAIN_ATTR_FAMILY, AF_INET); + nft_chain_attr_set_u32(a, NFT_CHAIN_ATTR_FAMILY, AF_INET); nft_chain_attr_set_str(a, NFT_CHAIN_ATTR_TABLE, "Table"); nft_chain_attr_set_u32(a, NFT_CHAIN_ATTR_POLICY,0x12345678); nft_chain_attr_set_u32(a, NFT_CHAIN_ATTR_HOOKNUM, 0x12345678); |