diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | ipset_nethash.c | 17 |
3 files changed, 18 insertions, 9 deletions
@@ -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) @@ -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); |