summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--Makefile2
-rw-r--r--ipset_nethash.c17
3 files changed, 18 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index a8c189a..96d3cce 100644
--- 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)
diff --git a/Makefile b/Makefile
index 694c6e4..d40ece1 100644
--- 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
diff --git a/ipset_nethash.c b/ipset_nethash.c
index 34a7152..0934571 100644
--- a/ipset_nethash.c
+++ b/ipset_nethash.c
@@ -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);