#!/bin/bash # # Listing meters should not include dynamic sets in the output # set -e RULESET=" add table t add set t s { type ipv4_addr; size 256; flags dynamic,timeout; } add chain t c add rule t c tcp dport 80 meter m size 128 { ip saddr limit rate 10/second } " expected_output="table ip t { meter m { type ipv4_addr size 128 flags dynamic } }" $NFT -f - <<< "$RULESET" test_output=$($NFT list meters) test "$test_output" = "$expected_output"