From 6fa394d59d91e6cfa3c107128ad1f7d6a6d70257 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Fri, 13 Mar 2015 21:18:58 +0100 Subject: Fix cidr handling for hash:*net* types Commit 092d67cda9ad4 broke the cidr handling for the hash:*net* types when the sets were used by the SET target: entries with invalid cidr values were added to the sets. Reported by Jonathan Johnson. Testsuite entry is added to verify the fix. --- tests/iptables.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/iptables.sh') diff --git a/tests/iptables.sh b/tests/iptables.sh index c5b9bf7..7ea90e0 100755 --- a/tests/iptables.sh +++ b/tests/iptables.sh @@ -95,6 +95,11 @@ del) $cmd -F INPUT $cmd -A INPUT -j SET --del-set ipport src,src ;; +add) + $ipset n test hash:net $family 2>/dev/null + $cmd -F INPUT + $cmd -A INPUT -j SET --add-set test src + ;; timeout) $ipset n test hash:ip,port timeout 2 $cmd -A INPUT -j SET --add-set test src,src --timeout 10 --exist -- cgit v1.2.3