From 3713072d3bcb5dc1cfbb7c5fa3e24b8a73fd4104 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Mon, 26 Nov 2018 10:54:36 +0100 Subject: 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.) --- tests/big_sort.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 tests/big_sort.sh (limited to 'tests/big_sort.sh') 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 -- cgit v1.2.3