summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/sets/meter_set_reuse
blob: 94eccc1a7b8208bb82e98483d300a81f4484a149 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

set -e

addrule()
{
	$NFT add rule ip filter input tcp dport 80 meter http1 { tcp dport . ip saddr limit rate over 200/second } counter drop
}

$NFT add table filter
$NFT add chain filter input
addrule

$NFT list meters

# This used to remove the anon set, but not anymore
$NFT flush chain filter input

# This re-add should work.
addrule