diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2018-11-26 10:54:36 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2018-11-26 10:54:36 +0100 |
commit | 3713072d3bcb5dc1cfbb7c5fa3e24b8a73fd4104 (patch) | |
tree | 0d43a750fb5ebc63aefc1d7ba6af327c58062ef6 /tests/big_sort.sh | |
parent | a680d3fdbb637fae53c60e4a30f028bd5ed1fe4b (diff) |
Implement sorting for hash types in the ipset tool
Support listing/saving with sorted entries for the hash types.
(bitmap and list types are automatically sorted.)
Diffstat (limited to 'tests/big_sort.sh')
-rwxr-xr-x | tests/big_sort.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/big_sort.sh b/tests/big_sort.sh new file mode 100755 index 0000000..05eced8 --- /dev/null +++ b/tests/big_sort.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +ipset x test >/dev/null 2>&1 +ipset n test hash:ip +for x in `seq 0 255`; do + for y in `seq 0 255`; do + echo "a test 10.10.$x.$y" + done +done | ipset r +ipset -t list > .foo +diff .foo big_sort.terse +ipset -s save > .foo +diff .foo big_sort.saved +ipset x test |