diff options
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> | 2005-04-19 07:29:07 +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> | 2005-04-19 07:29:07 +0000 |
commit | b46731dfbb13a88984f1e9fbab3dc072d2e3bacb (patch) | |
tree | 28e036ba81a50d2ec0bb7b9b2384f0b87133f8d3 | |
parent | 92c6d4511c7619668cdab21ff5a2f8ec5e2cdb87 (diff) | |
download | ipset-b46731dfbb13a88984f1e9fbab3dc072d2e3bacb.tar.gz |
new feature added: IP addresses in nethash type of sets can be tested
-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); |