diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-12-17 21:31:12 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-12-17 21:31:12 +0100 |
commit | 984023490f88346e58db68d77489e67b0c6c4ce8 (patch) | |
tree | 75b7cc931599876667381e5f995de6261f445184 /src/ipset_hash_ipportnet.c | |
parent | 62a05ab5fe3e5b60057fef9e669137cacab6b614 (diff) |
Support adding/deleting multiple entries, userspace part.
Support adding/deleting multiple entries in the userspace part
of the hash:ip,port, hash:ip,port,ip, hash:ip,port,net and
hash:net,port types.
Diffstat (limited to 'src/ipset_hash_ipportnet.c')
-rw-r--r-- | src/ipset_hash_ipportnet.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ipset_hash_ipportnet.c b/src/ipset_hash_ipportnet.c index 3c073cd..ff3a8ec 100644 --- a/src/ipset_hash_ipportnet.c +++ b/src/ipset_hash_ipportnet.c @@ -80,7 +80,11 @@ static const char hash_ipportnet_usage[] = "test SETNAME IP,PROTO:PORT,IP[/CIDR]\n\n" "where depending on the INET family\n" " IP are valid IPv4 or IPv6 addresses (or hostnames),\n" -" CIDR is a valid IPv4 or IPv6 CIDR prefix,\n"; +" CIDR is a valid IPv4 or IPv6 CIDR prefix.\n" +" Adding/deleting multiple elements in IP/CIDR or FROM-TO form\n" +" in the first IP component is supported for IPv4.\n" +" Adding/deleting multiple elements with TCP/UDP port range\n" +" is supported both for IPv4 and IPv6.\n"; struct ipset_type ipset_hash_ipportnet0 = { .name = "hash:ip,port,net", @@ -90,7 +94,7 @@ struct ipset_type ipset_hash_ipportnet0 = { .dimension = IPSET_DIM_THREE, .elem = { [IPSET_DIM_ONE] = { - .parse = ipset_parse_single_ip, + .parse = ipset_parse_ip4_single6, .print = ipset_print_ip, .opt = IPSET_OPT_IP }, @@ -129,13 +133,17 @@ struct ipset_type ipset_hash_ipportnet0 = { | IPSET_FLAG(IPSET_OPT_MAXELEM) | IPSET_FLAG(IPSET_OPT_TIMEOUT), [IPSET_ADD] = IPSET_FLAG(IPSET_OPT_IP) + | IPSET_FLAG(IPSET_OPT_IP_TO) | IPSET_FLAG(IPSET_OPT_PORT) + | IPSET_FLAG(IPSET_OPT_PORT_TO) | IPSET_FLAG(IPSET_OPT_PROTO) | IPSET_FLAG(IPSET_OPT_IP2) | IPSET_FLAG(IPSET_OPT_CIDR2) | IPSET_FLAG(IPSET_OPT_TIMEOUT), [IPSET_DEL] = IPSET_FLAG(IPSET_OPT_IP) + | IPSET_FLAG(IPSET_OPT_IP_TO) | IPSET_FLAG(IPSET_OPT_PORT) + | IPSET_FLAG(IPSET_OPT_PORT_TO) | IPSET_FLAG(IPSET_OPT_PROTO) | IPSET_FLAG(IPSET_OPT_IP2) | IPSET_FLAG(IPSET_OPT_CIDR2), |