summaryrefslogtreecommitdiffstats
path: root/lib/types.c
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2012-01-13 22:52:44 +0100
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2012-01-13 22:52:44 +0100
commit24b35d0b8950407ce85eefef18576d54f1e2c20e (patch)
tree8ecba4e1c02fb03cfab8ae0f37ab60b7455c137f /lib/types.c
parentdd71826fcfcfcc8c36f0508cc183dd222da40452 (diff)
Exceptions support added to hash:*net* types
The "nomatch" keyword and option is added to the hash:*net* types, by which one can add exception entries to sets. Example: ipset create test hash:net ipset add test 192.168.0/24 ipset add test 192.168.0/30 nomatch In this case the IP addresses from 192.168.0/24 except 192.168.0/30 match the elements of the set.
Diffstat (limited to 'lib/types.c')
-rw-r--r--lib/types.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/types.c b/lib/types.c
index 0b5826e..2c8e04f 100644
--- a/lib/types.c
+++ b/lib/types.c
@@ -26,13 +26,17 @@ extern struct ipset_type ipset_bitmap_port0;
extern struct ipset_type ipset_hash_ip0;
extern struct ipset_type ipset_hash_net0;
extern struct ipset_type ipset_hash_net1;
+extern struct ipset_type ipset_hash_net2;
extern struct ipset_type ipset_hash_netport1;
extern struct ipset_type ipset_hash_netport2;
+extern struct ipset_type ipset_hash_netport3;
extern struct ipset_type ipset_hash_netiface0;
+extern struct ipset_type ipset_hash_netiface1;
extern struct ipset_type ipset_hash_ipport1;
extern struct ipset_type ipset_hash_ipportip1;
extern struct ipset_type ipset_hash_ipportnet1;
extern struct ipset_type ipset_hash_ipportnet2;
+extern struct ipset_type ipset_hash_ipportnet3;
extern struct ipset_type ipset_list_set0;
/* Userspace cache of sets which exists in the kernel */
@@ -588,13 +592,16 @@ ipset_cache_fini(void)
ipset_type_add(&ipset_hash_ip0);
ipset_type_add(&ipset_hash_net0);
ipset_type_add(&ipset_hash_net1);
+ ipset_type_add(&ipset_hash_net2);
ipset_type_add(&ipset_hash_netport1);
ipset_type_add(&ipset_hash_netport2);
+ ipset_type_add(&ipset_hash_netport3);
ipset_type_add(&ipset_hash_netiface0);
+ ipset_type_add(&ipset_hash_netiface1);
ipset_type_add(&ipset_hash_ipport1);
ipset_type_add(&ipset_hash_ipportip1);
ipset_type_add(&ipset_hash_ipportnet1);
ipset_type_add(&ipset_hash_ipportnet2);
+ ipset_type_add(&ipset_hash_ipportnet3);
ipset_type_add(&ipset_list_set0);
}
- \ No newline at end of file