]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: extend 0025empty_dynset_0 to cover multi-statement support
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 9 Feb 2021 11:57:14 +0000 (12:57 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 9 Feb 2021 12:48:06 +0000 (13:48 +0100)
Add a test to cover multi-statement support.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/shell/testcases/nft-f/0025empty_dynset_0
tests/shell/testcases/nft-f/dumps/0025empty_dynset_0.nft

index 796628a7c69a0faa7a7a04e65312e24b2677b9a4..10c5cc1b700b93b2c16f0012a2b8ed1bcec9d48d 100755 (executable)
@@ -11,6 +11,12 @@ RULESET="table ip foo {
                 type ipv6_addr . inet_service . ifname . ipv6_addr . inet_service
                 flags dynamic
         }
+
+        set inflows_ratelimit {
+                type ipv4_addr . inet_service . ifname . ipv4_addr . inet_service
+                flags dynamic
+                elements = { 10.1.0.3 . 39466 . \"veth1\" . 10.3.0.99 . 5201 limit rate 1/second counter packets 0 bytes 0 }
+        }
 }"
 
 $NFT -f - <<< "$RULESET"
index 559eb49fc2e1e3703b0626c3b79e718ae0d322c9..2bb35592588a7a3cf15d47ab82553102d6589adf 100644 (file)
@@ -9,4 +9,10 @@ table ip foo {
                type ipv6_addr . inet_service . ifname . ipv6_addr . inet_service
                flags dynamic
        }
+
+       set inflows_ratelimit {
+               type ipv4_addr . inet_service . ifname . ipv4_addr . inet_service
+               flags dynamic
+               elements = { 10.1.0.3 . 39466 . "veth1" . 10.3.0.99 . 5201 limit rate 1/second counter packets 0 bytes 0 }
+       }
 }