break;
case IPSET_LIST_PLAIN:
safe_snprintf(session, "%sName: %s\n"
- "Type: %s\nHeader: ",
+ "Type: %s\nRevision: %u\nHeader: ",
session->printed_set ? "\n" : "",
ipset_data_setname(data),
- type->name);
+ type->name, type->revision);
break;
case IPSET_LIST_XML:
safe_snprintf(session,
"<ipset name=\"%s\">\n"
" <type>%s</type>\n"
+ " <revision%u</revision\n"
" <header>\n",
ipset_data_setname(data),
- type->name);
+ type->name, type->revision);
break;
default:
break;
# Range: Add a range of elements
0 ipset -A test 2.0.0.128-2.0.0.131 timeout 4
# Range: List set
-0 ipset list test | sed 's/timeout ./timeout x/' > .foo
+0 ipset list test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo
# Range: Check listing
0 diff -u -I 'Size in memory.*' .foo bitmap:ip.t.list4
# Sleep 5s so that entries can time out
0 sleep 5s
# Range: List set after timeout
-0 ipset list test > .foo
+0 ipset list test | grep -v Revision: > .foo
# Range: Check listing
0 diff -u -I 'Size in memory.*' .foo bitmap:ip.t.list0
# Range: Flush test set
# Network: Delete the same element
0 ipset -D test 2.0.0.128
# Network: List set
-0 ipset list test | sed 's/timeout ./timeout x/' > .foo
+0 ipset list test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo
# Network: Check listing
0 diff -u -I 'Size in memory.*' .foo bitmap:ip.t.list5
# Sleep 5s so that entries can time out
0 sleep 5s
# Network: List set
-0 ipset list test > .foo
+0 ipset list test | grep -v Revision: > .foo
# Network: Check listing
0 diff -u -I 'Size in memory.*' .foo bitmap:ip.t.list1
# Network: Flush test set
# Subnets: Add a subnet of subnets
0 ipset -A test 10.8.0.0/16 timeout 4
# Subnets: List set
-0 ipset list test | sed 's/timeout ./timeout x/' > .foo
+0 ipset list test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo
# Subnets: Check listing
0 diff -u -I 'Size in memory.*' .foo bitmap:ip.t.list6
# Sleep 5s so that entries can time out
0 sleep 5s
# Subnets: List set
-0 ipset list test > .foo
+0 ipset list test | grep -v Revision: > .foo
# Subnets: Check listing
0 diff -u -I 'Size in memory.*' .foo bitmap:ip.t.list2
# Subnets: Flush test set
# Full: Test element not added to the set
1 ipset test test 0.1.0.0
# Full: List set
-0 ipset list test > .foo
+0 ipset list test | grep -v Revision: > .foo
# Full: Check listing
0 diff -u -I 'Size in memory.*' .foo bitmap:ip.t.list3
# Full: flush set
# Try to add value after second random value
0 ipset add test 2.1.0.1,128,2.2.2.2
# List set
-0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip,port,ip.t.list0
# Sleep 5s so that elements can time out
0 sleep 5
# List set
-0 ipset list test > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip,port,ip.t.list1
# Flush test set
# Try to add value after second random value
0 ipset add test 2.1.0.1,128,10.0.0.0/17
# List set
-0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip,port,net.t.list0
# Sleep 5s so that elements can time out
# Try to add value after second random value
0 ipset add test 2.1.0.1,128
# List set
-0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip,port.t.list0
# Sleep 5s so that elements can time out
0 sleep 5
# List set
-0 ipset list test > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip,port.t.list1
# Flush test set
# Delete element with sctp
0 ipset del test 2.0.0.1,sctp:80
# List set
-0 ipset list test > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip,port.t.list2
# Delete set
# IP: Delete the same value
0 ipset -D test 200.100.0.12
# IP: List set
-0 ipset -L test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# IP: Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip.t.list2
# Sleep 5s so that element can time out
0 sleep 5
# IP: List set
-0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
+0 ipset -L test 2>/dev/null | grep -v Revision: > .foo0 && ./sort.sh .foo0
# IP: Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip.t.list0
# IP: Flush test set
# Network: Delete the same network
0 ipset -D test 200.100.0.12
# Network: List set
-0 ipset -L test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Network: Check listing
0 diff -u -I 'Size in memory.*' -I 'Size in memory.*' .foo hash:ip.t.list3
# Sleep 5s so that elements can time out
0 sleep 5
# Network: List set
-0 ipset -L test > .foo
+0 ipset -L test | grep -v Revision: > .foo
# Network: Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip.t.list1
# Network: Flush test set
# Try to add value after second random value
0 ipset add test 2:1:0::1,128,2:2:2::2
# List set
-0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip6,port,ip6.t.list0
# Sleep 5s so that elements can time out
0 sleep 5
# List set
-0 ipset list test > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip6,port,ip6.t.list1
# Flush test set
# Range: Try to add value after second random value
0 ipset -A test 2:1:0::1,128,2:2:2::2/12
# Range: List set
-0 ipset -L test > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Range: Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip6,port,net6.t.list0
# Range: Flush test set
# Try to add value after second random value
0 ipset add test 2:1:0::1,128
# List set
-0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip6,port.t.list0
# Sleep 5s so that elements can time out
0 sleep 5
# List set
-0 ipset list test > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip6,port.t.list1
# Flush test set
# IP: Delete the same value
0 ipset -D test 200:100:0::12
# IP: List set
-0 ipset -L test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# IP: Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip6.t.list2
# IP: Save set
# Sleep 5s so that element can time out
0 sleep 5
# IP: List set
-0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
+0 ipset -L test 2>/dev/null | grep -v Revision: > .foo0 && ./sort.sh .foo0
# IP: Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip6.t.list0
# IP: Destroy set
# IP: Restore saved set
0 ipset restore < hash:ip6.t.restore && rm hash:ip6.t.restore
# IP: List set
-0 ipset -L test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# IP: Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip6.t.list2
# IP: Flush test set
# Network: Test the deleted network
1 ipset -T test 200:101:0::12
# Network: List set
-0 ipset -L test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Network: Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip6.t.list3
# Sleep 5s so that elements can time out
0 sleep 5
# Network: List set
-0 ipset -L test > .foo
+0 ipset -L test | grep -v Revision: > .foo
# Network: Check listing
0 diff -u -I 'Size in memory.*' .foo hash:ip6.t.list1
# Network: Flush test set
# Check more complex restore commands
0 ipset restore < restore.t.restore
# List restored set a
-0 ipset l a > .foo0 && ./sort.sh .foo0
+0 ipset l a | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing of set a
0 diff -u -I 'Size in memory.*' .foo restore.t.list0
# List restored set b
-0 ipset l b > .foo0 && ./sort.sh .foo0
+0 ipset l b | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing of set b
0 diff -u -I 'Size in memory.*' .foo restore.t.list1
# Destroy by restore
# Try to add IP address
0 ipset add test 2.0.0.1,eth0
# List set
-0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:net,iface.t.list0
# Flush test set
# Add networks in range notation
0 ipset add test 10.2.0.0-10.2.1.12,eth0
# List set
-0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
+0 ipset -L test 2>/dev/null | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:net,iface.t.list2
# Flush test set
# Add overlapping networks from /4 to /30
0 (set -e; for x in `seq 4 30`; do ipset add test 192.0.0.0/$x,eth$x; done)
# List test set
-0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
+0 ipset -L test 2>/dev/null | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:net,iface.t.list1
# Test matching elements in all added networks from /30 to /24
# Add clashing elements
0 (set -e; for x in `seq 0 63`; do ipset add test 10.0.0.0/16,eth$x; done)
# Check listing
-0 n=`ipset list test | wc -l` && test $n -eq 70
+0 n=`ipset list test | grep -v Revision: | wc -l` && test $n -eq 70
# Delete test set
0 ipset destroy test
# Create test set with timeout support
# Test ICMP by name
0 ipset test test 2.0.0.255,icmp:host-prohibited
# List set
-0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:net,port.t.list0
# Sleep 5s so that element can time out
0 sleep 5
# IP: List set
-0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
+0 ipset -L test 2>/dev/null | grep -v Revision: > .foo0 && ./sort.sh .foo0
# IP: Check listing
0 diff -u -I 'Size in memory.*' .foo hash:net,port.t.list1
# Flush test set
# Try to add IP address
0 ipset add test 2.0.0.1
# List set
-0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:net.t.list0
# Sleep 5s so that element can time out
0 sleep 5
# List set
-0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
+0 ipset -L test 2>/dev/null | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:net.t.list1
# Flush test set
# Add networks in range notation
0 ipset add test 10.2.0.0-10.2.1.12
# List set
-0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
+0 ipset -L test 2>/dev/null | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:net.t.list2
# Delete test set
# Test ICMPv6 by name
0 ipset test test 192:168:68::95,icmpv6:port-unreachable
# List set
-0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Save set
0 ipset save test > hash:net6,port.t.restore
# Check listing
# Sleep 5s so that element can time out
0 sleep 5
# IP: List set
-0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
+0 ipset -L test 2>/dev/null | grep -v Revision: > .foo0 && ./sort.sh .foo0
# IP: Check listing
0 diff -u -I 'Size in memory.*' .foo hash:net6,port.t.list1
# Destroy set
# Restore set
0 ipset restore < hash:net6,port.t.restore && rm hash:net6,port.t.restore
# List set
-0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:net6,port.t.list0
# Flush test set
# Try to add IP address
0 ipset add test 3:0:0::1
# List set
-0 ipset list test | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
+0 ipset list test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo hash:net6.t.list0
# Sleep 5s so that element can time out
0 sleep 5
# IP: List set
-0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
+0 ipset -L test 2>/dev/null | grep -v Revision: > .foo0 && ./sort.sh .foo0
# IP: Check listing
0 diff -u -I 'Size in memory.*' .foo hash:net6.t.list1
# Flush test set
# IP: Delete element not added to the set, ignoring error
0 ipset -! -D test 200.100.0.12
# IP: List set
-0 ipset -L test 2>/dev/null > .foo0 && ./sort.sh .foo0
+0 ipset -L test 2>/dev/null | grep -v Revision: > .foo0 && ./sort.sh .foo0
# IP: Check listing
0 diff -u -I 'Size in memory.*' .foo iphash.t.list0
# IP: Flush test set
# Network: Delete element not added to the set
1 ipset -D test 200.100.0.12
# Network: List set
-0 ipset -L test > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Network: Check listing
0 diff -u -I 'Size in memory.*' .foo iphash.t.list1
# Network: Flush test set
# Range: Restore set
0 ipset -R < ipmap.t.restore && rm ipmap.t.restore
# Range: List set
-0 ipset -L test > .foo
+0 ipset -L test | grep -v Revision: > .foo
# Range: Check listing
0 diff -u -I 'Size in memory.*' .foo ipmap.t.list0
# Range: Delete a range of elements
0 ipset -! -D test 2.0.0.128-2.0.0.132
# Range: List set
-0 ipset -L test > .foo
+0 ipset -L test | grep -v Revision: > .foo
# Range: Check listing
0 diff -u -I 'Size in memory.*' .foo ipmap.t.list1
# Range: Flush test set
# Network: Delete the same element
0 ipset -D test 2.0.0.128
# Network: List set
-0 ipset -L test > .foo
+0 ipset -L test | grep -v Revision: > .foo
# Network: Check listing
0 diff -u -I 'Size in memory.*' .foo ipmap.t.list2
# Network: Flush test set
# Subnets: Add a subnet of subnets
0 ipset -A test 10.8.0.0/16
# Subnets: List set
-0 ipset -L test > .foo
+0 ipset -L test | grep -v Revision: > .foo
# Subnets: Check listing
0 diff -u -I 'Size in memory.*' .foo ipmap.t.list3
# Subnets: FLush test set
# Full: Delete same element
0 ipset -D test 0.1.0.0
# Full: List set
-0 ipset -L test > .foo
+0 ipset -L test | grep -v Revision: > .foo
# Full: Check listing
0 diff -u -I 'Size in memory.*' .foo ipmap.t.list4
# Full: Delete test set
# Try to add value after second random value
0 ipset -A test 2.1.0.1,128
# List set
-0 ipset -L test > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo ipporthash.t.list0
# Flush test set
# Try to add value after second random value
0 ipset -A test 2.1.0.0,128
# List set
-0 ipset -L test > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo ipporthash.t.list1
# Flush test set
# Try to add value after second random value
0 ipset -A test 2.1.0.1,128,2.2.2.2
# List set
-0 ipset -L test > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo ipportiphash.t.list0
# Flush test set
# Try to del value before first random value
0 ipset -D test 1.255.255.255,5,1.1.1.1
# List set
-0 ipset -L test > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo ipportiphash.t.list1
# Flush test set
# Range: Try to add value after second random value
0 ipset -A test 2.1.0.1,128,2.2.2.2/12
# Range: List set
-0 ipset -L test > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Range: Check listing
0 diff -u -I 'Size in memory.*' .foo ipportnethash.t.list0
# Range: Flush test set
# Network: Try to add value after second random value
0 ipset -A test 2.1.0.0,128,2.2.2.2/12
# Network: List set
-0 ipset -L test > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Network: Check listing
0 diff -u -I 'Size in memory.*' .foo ipportnethash.t.list1
# Network: Flush test set
# Static: Test value not added to the set
1 ipset -T test 192.168.68.70
# Static: List set
-0 ipset -L test > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Static: Check listing
0 diff -u -I 'Size in memory.*' .foo iptree.t.list0
# Static: Flush test set
# Test element after upper bound of deleted network
0 ipset -T test 192.168.68.72
# List set
-0 ipset -L test > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo iptreemap.t.list0
# Flush test set
# Range: Delete the same element
0 ipset -D test 2.0.200.214
# Range: List set
-0 ipset -L test > .foo
+0 ipset -L test | grep -v Revision: > .foo
# Range: Check listing
0 diff -u -I 'Size in memory.*' .foo macipmap.t.list0
# Range: Flush test set
# Network: Add MAC to already added element
0 ipset -A test 2.0.255.255,00:11:22:33:44:56
# Network: List set
-0 ipset -L test > .foo
+0 ipset -L test | grep -v Revision: > .foo
# Network: Check listing
0 diff -u -I 'Size in memory.*' .foo macipmap.t.list1
# Network: Flush test set
# Range: Delete the same element
0 ipset -D test 2.0.200.214
# Range: List set
-0 ipset -L test | sed 's/timeout ./timeout x/' > .foo
+0 ipset -L test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo
# Range: Check listing
0 diff -u -I 'Size in memory.*' .foo macipmap.t.list3
# Range: sleep 5s so that elements can timeout
0 sleep 5
# Range: List set
-0 ipset -L test | sed 's/timeout ./timeout x/' > .foo
+0 ipset -L test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo
# Range: Check listing
0 diff -u -I 'Size in memory.*' .foo macipmap.t.list2
# Range: Flush test set
# Try to add IP address
0 ipset -A test 2.0.0.1
# List set
-0 ipset -L test > .foo0 && ./sort.sh .foo0
+0 ipset -L test | grep -v Revision: > .foo0 && ./sort.sh .foo0
# Check listing
0 diff -u -I 'Size in memory.*' .foo nethash.t.list0
# Flush test set
# Range: Delete the same element
0 ipset -D test 567
# Range: List set
-0 ipset -L test > .foo
+0 ipset -L test | grep -v Revision: > .foo
# Range: Check listing
0 diff -u -I 'Size in memory.*' .foo portmap.t.list0
# Range: Flush test set
# Full: Test value not added to the set
1 ipset -T test 1
# Full: List set
-0 ipset -L test > .foo
+0 ipset -L test | grep -v Revision: > .foo
# Full: Check listing
0 diff -u -I 'Size in memory.*' .foo portmap.t.list1
# Full: Flush test set
# Full: Delete the same element
0 ipset -D test 567
# Full: List set
-0 ipset -L test | sed 's/timeout ./timeout x/' > .foo
+0 ipset -L test | grep -v Revision: | sed 's/timeout ./timeout x/' > .foo
# Full: Check listing
0 diff -u -I 'Size in memory.*' .foo portmap.t.list3
# Full: sleep 5s so that elements can timeout
0 sleep 5
# Full: List set
-0 ipset -L test > .foo
+0 ipset -L test | grep -v Revision: > .foo
# Full: Check listing
# 0 diff -u -I 'Size in memory.*' .foo portmap.t.list2
# Full: Flush test set
# Restore saved sets
0 ipset -R < setlist.t.r
# List set
-0 ipset -L test > .foo
+0 ipset -L test | grep -v Revision: > .foo
# Check listing
0 diff -u -I 'Size in memory.*' .foo setlist.t.list0
# Flush all sets
# Add set a before b
0 ipset add test a before b
# List test set
-0 ipset list test > .foo
+0 ipset list test | grep -v Revision: > .foo
# Check listing
0 diff -u -I 'Size in memory.*' .foo setlist.t.list1
# Test a set before b
# Delete b set before c
0 ipset del test b before c
# List test set
-0 ipset list test > .foo
+0 ipset list test | grep -v Revision: > .foo
# Check listing
0 diff -u -I 'Size in memory.*' .foo setlist.t.list2
# Delete c set after a
0 ipset del test c after a
# List test set
-0 ipset list test > .foo
+0 ipset list test | grep -v Revision: > .foo
# Check listing
0 diff -u -I 'Size in memory.*' .foo setlist.t.list3
# List all sets
-0 ipset list > .foo
+0 ipset list | grep -v Revision: > .foo
# Check listing
0 diff -u -I 'Size in memory.*' .foo setlist.t.list4
# Flush sets