]> git.ipfire.org Git - thirdparty/nftables.git/commit
parser_bison: allow to use quota in sets
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 1 Mar 2023 10:12:20 +0000 (11:12 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 2 Nov 2023 10:56:19 +0000 (11:56 +0100)
commitc6ae433b343cc32ccc117564f06e6dab7ac3ec62
tree0fedaee1554207044af8f6ffbcc4f7ef3ddf9178
parent5a36ff4a47ecf2b1c66f767c3a63e22edd9ef299
parser_bison: allow to use quota in sets

commit 87e5f35bc58450d352c303a8ff51b02193605d66 upstream.

src: support for restoring element quota

This patch allows you to restore quota in dynamic sets.

 table ip x {
        set y {
                type ipv4_addr
                size 65535
                flags dynamic,timeout
                counter quota 500 bytes
                timeout 1h
                elements = { 8.8.8.8 counter packets 9 bytes 756 quota 500 bytes used 500 bytes timeout 1h expires 56m57s47ms }
        }

        chain z {
                type filter hook output priority filter; policy accept;
                update @y { ip daddr } counter packets 6 bytes 507
        }
 }

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/parser_bison.y
tests/shell/testcases/sets/0060set_multistmt_1 [new file with mode: 0755]
tests/shell/testcases/sets/dumps/0060set_multistmt_1.nft [new file with mode: 0644]