]> git.ipfire.org Git - thirdparty/ipset.git/commitdiff
new feature added: IP addresses in nethash type of sets can be tested
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kadlec/emailAddress=kadlec@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kadlec/emailAddress=kadlec@netfilter.org>
Tue, 19 Apr 2005 07:29:07 +0000 (07:29 +0000)
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kadlec/emailAddress=kadlec@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=kadlec/emailAddress=kadlec@netfilter.org>
Tue, 19 Apr 2005 07:29:07 +0000 (07:29 +0000)
ChangeLog
Makefile
ipset_nethash.c

index a8c189afe67b27ade1643045d23a3294b5efb4ff..96d3ccebdbb0fe9693c99f431a35f0de6f1210b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
-2.1.1
+2.2.1
+ - Magic number in ip_set_nethash.h was mistyped (bug reported by Rob
+   Carlson)
+ - ipset can now test IP addresses in nethash type of sets (i.e. addresses
+   in netblocks added to the set)
+
+2.2.0
  - Locking bug in ip_set_nethash.c (Clifford Wolf and Rob Carlson)
  - Makefile contained an unnecessary variable in IPSET_LIB_DIR (Clifford
    Wolf)
index 694c6e41e49d5ae7d3f03ee4b8a6239057f9797d..d40ece112f2db6e1fafade6eb42738d970e49e6e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ ifndef KERNEL_DIR
 KERNEL_DIR=/usr/src/linux
 endif
 
-IPSET_VERSION:=2.2.0
+IPSET_VERSION:=2.2.1
 
 PREFIX:=/usr/local
 LIBDIR:=$(PREFIX)/lib
index 34a7152bf6e6e5d7de117548a633d66fe59b0867..0934571af9d6a70c27890e8bec41a03b84ad12d0 100644 (file)
@@ -136,13 +136,16 @@ ip_set_ip_t adt_parser(unsigned cmd, const char *optarg, void *data)
 
        ptr = strsep(&tmp, "/");
        
-       if (tmp == NULL)
-               exit_error(PARAMETER_PROBLEM,
-                          "Missing cidr from `%s'", optarg);
-
-       if (string_to_number(tmp, 1, 31, &cidr))
-               exit_error(PARAMETER_PROBLEM,
-                          "Out of range cidr `%s' specified", optarg);
+       if (tmp == NULL) {
+               if (cmd == CMD_TEST)
+                       cidr = 32;
+               else
+                       exit_error(PARAMETER_PROBLEM,
+                                  "Missing cidr from `%s'", optarg);
+       } else
+               if (string_to_number(tmp, 1, 31, &cidr))
+                       exit_error(PARAMETER_PROBLEM,
+                                  "Out of range cidr `%s' specified", optarg);
        
        mydata->cidr = cidr;
        parse_ip(ptr, &mydata->ip);