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

# This is the testscase:
# * creating valid named limits
# * referencing them from a valid rule

RULESET="
table ip filter {
	limit http-traffic {
		rate 1/second
	}
	chain input {
		type filter hook input priority 0; policy accept;
		limit name tcp dport map { 80 : "http-traffic", 443 : "http-traffic"}
	}
}"

set -e
$NFT -f - <<< "$RULESET"