]> git.ipfire.org Git - thirdparty/ipset.git/commitdiff
The set type revision number is added to the header part of listing
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Tue, 11 Sep 2012 15:34:37 +0000 (17:34 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Tue, 11 Sep 2012 15:34:37 +0000 (17:34 +0200)
Incompatibility: if your script rely on the number of lines in the header
of set listings, then the new line

Revision: number

can break your script.

26 files changed:
lib/session.c
tests/bitmap:ip.t
tests/hash:ip,port,ip.t
tests/hash:ip,port,net.t
tests/hash:ip,port.t
tests/hash:ip.t
tests/hash:ip6,port,ip6.t
tests/hash:ip6,port,net6.t
tests/hash:ip6,port.t
tests/hash:ip6.t
tests/hash:net,iface.t
tests/hash:net,port.t
tests/hash:net.t
tests/hash:net6,port.t
tests/hash:net6.t
tests/iphash.t
tests/ipmap.t
tests/ipporthash.t
tests/ipportiphash.t
tests/ipportnethash.t
tests/iptree.t
tests/iptreemap.t
tests/macipmap.t
tests/nethash.t
tests/portmap.t
tests/setlist.t

index 3803bfa07ca0c86d153a2ae628ef812a2e09cc29..d5f220f3a7aa8adb73bde2bcee2235ac3ee97d21 100644 (file)
@@ -842,18 +842,19 @@ list_create(struct ipset_session *session, struct nlattr *nla[])
                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;
index dc914d1e1c7eac84cf2681e7e66325a7fb4af065..4389d8fa1744173e8ec5dad7130f82eca1f52afb 100644 (file)
 # 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
index 01132e8361ee2e165993b0ab3ee8fb8f99b32411..26710c6da182e09b7ec1e0a759193018596bd2a4 100644 (file)
 # 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
index 446c512ae29934fd6b75874e4c69a523eead86eb..dad551a9b14b8dcf1bb7278e2cb9e99ad8cc225f 100644 (file)
@@ -27,7 +27,7 @@
 # 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
index c2bc0ccc9a45f1a78a9b7408a3ac981a40fcd9f8..cd1140eaf4be60200174f59565da0ca859cd4787 100644 (file)
 # 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
@@ -69,7 +69,7 @@
 # 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
index 8ae584fca11d6183e4a16d92f8803dd6752fcc85..6da46924b80557cb6f00d810fda826679b4a365b 100644 (file)
 # 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
index 078ab6c3d44529f209cb50842332ed646e270b47..80e15343da68de4405e9e0af4cf49f49afa311a7 100644 (file)
 # 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
index 1955cadeb49e1f2deee616c721a3c812daa2235a..1c4e856ba453de282e3b0cd2992ade777af1faae 100644 (file)
@@ -35,7 +35,7 @@
 # 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
index 884933c29076fd2ac7d1ed171b8ec30546700a39..d583415db28ed79ea263d353e9906c7c1cccfa12 100644 (file)
 # 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
index a913f22dccd42d1f40327ed0db125693a0fd4c69..4ab5f5bd00aa4c4277fa5c3e7bead8ad2aeebf25 100644 (file)
@@ -21,7 +21,7 @@
 # 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
@@ -29,7 +29,7 @@
 # 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
@@ -37,7 +37,7 @@
 # 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
index 779d77f001d10847336bbe479b1dff0fdb14ba69..f40f10b0f217b67927bc22b895737bd1553561d2 100644 (file)
@@ -41,7 +41,7 @@
 # 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
@@ -53,7 +53,7 @@
 # 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
index 5b6047680f4fcdd58da2cbbbd2d03560ecb0b405..34b29f1c489d6cf0065b49650fa073abde7090aa 100644 (file)
 # 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
index 10e75d9b77269c653e50274aea822c9ae85b20cc..14eed43040598518cf27c370765e0459fde73772 100644 (file)
 # 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
@@ -51,7 +51,7 @@
 # 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
index 063b4c9a9804be695c4dcc8f27d7439a1375d0d6..b022e069ec7875cdcffb6ce38ec2ba81b257f7d4 100644 (file)
@@ -41,7 +41,7 @@
 # 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
@@ -49,7 +49,7 @@
 # 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
@@ -57,7 +57,7 @@
 # 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
index 22003620e6fa173f60b982f3cb3360b2df7333f8..d0c2652163748f447f8df1fee67e3698619d98b7 100644 (file)
 # 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
index 2196a3431b5dc43925e9b0369c0919ed3a1ece60..8fd0836c0832cb0b1d621b3cc7a95e3d3f3922fa 100644 (file)
@@ -23,7 +23,7 @@
 # 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
@@ -77,7 +77,7 @@
 # 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
index a3bff10a0ecdc3775e4b6ca2b44aaf18d3355f27..684fb7d957ec3ca7e1ed30754cb6f72306166a73 100644 (file)
 # 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
@@ -91,7 +91,7 @@
 # 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
index 4875ed876f34a8e8dc9a16c74148de69e1bef33b..866c7203755137945813ad6c880320dac24d479c 100644 (file)
@@ -31,7 +31,7 @@
 # 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
@@ -61,7 +61,7 @@
 # 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
index ff65de0d6d963d8709418ad73e8251a674e44477..563243372419ad83f775d135657feb6d87438fd4 100644 (file)
@@ -39,7 +39,7 @@
 # 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
@@ -71,7 +71,7 @@
 # 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
index 120ff8855617fc24bfe9bf8a60ff8db1c9553b9d..f5be27f5560bfd7a7ea2c375c6ab64a2c1dc7312 100644 (file)
@@ -35,7 +35,7 @@
 # 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
@@ -65,7 +65,7 @@
 # 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
index 2185a9f33062389087b08fb70f7122643375b832..1e5f7ade78119e7341129e5c5e2f23ae58d6847a 100644 (file)
@@ -13,7 +13,7 @@
 # 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
index 5a4d3079ae1537a53367f28a56bbffd9a88911e6..8061b4fcd7d538947f272910f3bf1daa7f47c550 100644 (file)
@@ -49,7 +49,7 @@
 # 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
index 19fb0395ac387e9a362fe656523f503040e598b1..e10fe03f1b1d44a261b7642f2dd94c525711312c 100644 (file)
@@ -39,7 +39,7 @@
 # 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
@@ -79,7 +79,7 @@
 # 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
index 40f79fe5fb18b9a39376ec2543c4cb5b2f4704de..273ceeba8da80cbe641aac461d55cd7180c4a425 100644 (file)
@@ -33,7 +33,7 @@
 # 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
index c9856bf9285d11e91136b23819d7a18ae3457a8f..36ad682f976ddd283f6244c9fbdfcc6be68ebd20 100644 (file)
@@ -25,7 +25,7 @@
 # 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
@@ -45,7 +45,7 @@
 # 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
index 6f81afc53586f72b943a5bd20f0141eae08628fb..aa360b97aa7f4ac55c6908c37d80359df0ca6d0c 100644 (file)
@@ -45,7 +45,7 @@
 # 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
@@ -61,7 +61,7 @@
 # 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