summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/sets/0026named_limit_0
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/sets/0026named_limit_0')
-rwxr-xr-xtests/shell/testcases/sets/0026named_limit_014
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/shell/testcases/sets/0026named_limit_0 b/tests/shell/testcases/sets/0026named_limit_0
index 91553f34..23bc0b02 100755
--- a/tests/shell/testcases/sets/0026named_limit_0
+++ b/tests/shell/testcases/sets/0026named_limit_0
@@ -4,15 +4,7 @@
# * creating valid named limits
# * referencing them from a valid rule
-tmpfile=$(mktemp)
-if [ ! -w $tmpfile ] ; then
- echo "Failed to create tmp file" >&2
- exit 0
-fi
-
-trap "rm -rf $tmpfile" EXIT # cleanup if aborted
-
-echo "
+RULESET="
table ip filter {
limit http-traffic {
rate 1/second
@@ -21,7 +13,7 @@ table ip filter {
type filter hook input priority 0; policy accept;
limit name tcp dport map { 80 : "http-traffic", 443 : "http-traffic"}
}
-}" > $tmpfile
+}"
set -e
-$NFT -f $tmpfile
+$NFT -f - <<< $RULESET