diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-01-11 19:38:24 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-01-13 13:44:53 +0100 |
commit | 18bd29733fb67f975fcce1ae8c1aaed22220cd4d (patch) | |
tree | f9e06d8c6b97cdf7a7977b9d9fde31b6b49f539b /tests/nft-expr_limit-test.c | |
parent | 1a3c075be1cf57dc248f38a974a8a01457e6b6e2 (diff) |
expr: limit: add support for flags
This patch adds the limit flags, the first client of this is the
inversion flag that allows us to match overlimit.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/nft-expr_limit-test.c')
-rw-r--r-- | tests/nft-expr_limit-test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/nft-expr_limit-test.c b/tests/nft-expr_limit-test.c index bbc82c1..29fb489 100644 --- a/tests/nft-expr_limit-test.c +++ b/tests/nft-expr_limit-test.c @@ -43,6 +43,9 @@ static void cmp_nftnl_expr(struct nftnl_expr *rule_a, if (nftnl_expr_get_u64(rule_a, NFTNL_EXPR_LIMIT_TYPE) != nftnl_expr_get_u64(rule_b, NFTNL_EXPR_LIMIT_TYPE)) print_err("Expr TYPE mismatches"); + if (nftnl_expr_get_u32(rule_a, NFTNL_EXPR_LIMIT_FLAGS) != + nftnl_expr_get_u32(rule_b, NFTNL_EXPR_LIMIT_FLAGS)) + print_err("Expr FLAGS mismatches"); } int main(int argc, char *argv[]) @@ -66,6 +69,7 @@ int main(int argc, char *argv[]) nftnl_expr_set_u64(ex, NFTNL_EXPR_LIMIT_UNIT, 0x123456789abcdef0); nftnl_expr_set_u32(ex, NFTNL_EXPR_LIMIT_BURST, 0x89123456); nftnl_expr_set_u32(ex, NFTNL_EXPR_LIMIT_TYPE, 0xdef01234); + nftnl_expr_set_u32(ex, NFTNL_EXPR_LIMIT_FLAGS, 0xdef01234); nftnl_rule_add_expr(a, ex); |