#!/bin/bash # NFT_TEST_REQUIRES(NFT_TEST_HAVE_catchall_element) set -e RULESET="table ip x { set y { type ipv4_addr counter elements = { 1.1.1.1, * } } set z { type ipv4_addr flags interval counter elements = { 1.1.1.0/24 , * } } }" $NFT -f - <<< $RULESET $NFT delete element x y { \* } $NFT add element x y { \* }