diff options
Diffstat (limited to 'tests/shell')
-rwxr-xr-x | tests/shell/testcases/sets/0041interval_0 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/0041interval_0 b/tests/shell/testcases/sets/0041interval_0 new file mode 100755 index 00000000..42fc6ccf --- /dev/null +++ b/tests/shell/testcases/sets/0041interval_0 @@ -0,0 +1,25 @@ +#!/bin/bash + +set -e + +RULESET=" +table ip t { + set s { + type ipv4_addr + flags interval + elements = { 192.168.2.195, 192.168.2.196, + 192.168.2.197, 192.168.2.198 } + } +}" + +$NFT -f - <<< "$RULESET" + +$NFT 'delete element t s { 192.168.2.195, 192.168.2.196 }; add element t s { 192.168.2.196 }' 2>/dev/null +$NFT get element t s { 192.168.2.196, 192.168.2.197, 192.168.2.198 } 1>/dev/null +$NFT 'delete element t s { 192.168.2.196, 192.168.2.197 }; add element t s { 192.168.2.197 }' 2>/dev/null +$NFT get element t s { 192.168.2.197, 192.168.2.198 } 1>/dev/null +$NFT 'delete element t s { 192.168.2.198, 192.168.2.197 }; add element t s { 192.168.2.196, 192.168.2.197, 192.168.2.195 }' 1>/dev/null +$NFT get element t s { 192.168.2.196, 192.168.2.197, 192.168.2.195 } 1>/dev/null +$NFT delete element t s { 192.168.2.196, 192.168.2.197, 192.168.2.195 } 2>/dev/null +$NFT create element t s { 192.168.2.196} 2>/dev/null +$NFT get element t s { 192.168.2.196 } 1>/dev/null |