File tree Expand file tree Collapse file tree
include/linux/netfilter/ipset Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ enum {
105105 IPSET_ATTR_IP2 ,
106106 IPSET_ATTR_CIDR2 ,
107107 IPSET_ATTR_IP2_TO ,
108+ IPSET_ATTR_IFACE ,
108109 __IPSET_ATTR_ADT_MAX ,
109110};
110111#define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1)
@@ -153,6 +154,8 @@ enum ipset_cmd_flags {
153154enum ipset_cadt_flags {
154155 IPSET_FLAG_BIT_BEFORE = 0 ,
155156 IPSET_FLAG_BEFORE = (1 << IPSET_FLAG_BIT_BEFORE ),
157+ IPSET_FLAG_BIT_PHYSDEV = 1 ,
158+ IPSET_FLAG_PHYSDEV = (1 << IPSET_FLAG_BIT_PHYSDEV ),
156159};
157160
158161/* Commands with settype-specific attributes */
@@ -212,6 +215,8 @@ enum ip_set_feature {
212215 IPSET_TYPE_IP2 = (1 << IPSET_TYPE_IP2_FLAG ),
213216 IPSET_TYPE_NAME_FLAG = 4 ,
214217 IPSET_TYPE_NAME = (1 << IPSET_TYPE_NAME_FLAG ),
218+ IPSET_TYPE_IFACE_FLAG = 5 ,
219+ IPSET_TYPE_IFACE = (1 << IPSET_TYPE_IFACE_FLAG ),
215220 /* Strictly speaking not a feature, but a flag for dumping:
216221 * this settype must be dumped last */
217222 IPSET_DUMP_LAST_FLAG = 7 ,
Original file line number Diff line number Diff line change @@ -63,6 +63,9 @@ struct ip_set_hash {
6363#ifdef IP_SET_HASH_WITH_NETMASK
6464 u8 netmask ; /* netmask value for subnets to store */
6565#endif
66+ #ifdef IP_SET_HASH_WITH_RBTREE
67+ struct rb_root rbtree ;
68+ #endif
6669#ifdef IP_SET_HASH_WITH_NETS
6770 struct ip_set_hash_nets nets [0 ]; /* book-keeping of prefixes */
6871#endif
@@ -200,6 +203,9 @@ ip_set_hash_destroy(struct ip_set *set)
200203 del_timer_sync (& h -> gc );
201204
202205 ahash_destroy (h -> table );
206+ #ifdef IP_SET_HASH_WITH_RBTREE
207+ rbtree_destroy (& h -> rbtree );
208+ #endif
203209 kfree (h );
204210
205211 set -> data = NULL ;
Original file line number Diff line number Diff line change @@ -109,6 +109,16 @@ config IP_SET_HASH_NETPORT
109109
110110 To compile it as a module, choose M here. If unsure, say N.
111111
112+ config IP_SET_HASH_NETIFACE
113+ tristate "hash:net,iface set support"
114+ depends on IP_SET
115+ help
116+ This option adds the hash:net,iface set type support, by which
117+ one can store IPv4/IPv6 network address/prefix and
118+ interface name pairs as elements in a set.
119+
120+ To compile it as a module, choose M here. If unsure, say N.
121+
112122config IP_SET_LIST_SET
113123 tristate "list:set set support"
114124 depends on IP_SET
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ obj-$(CONFIG_IP_SET_HASH_IPPORTIP) += ip_set_hash_ipportip.o
1919obj-$(CONFIG_IP_SET_HASH_IPPORTNET) += ip_set_hash_ipportnet.o
2020obj-$(CONFIG_IP_SET_HASH_NET) += ip_set_hash_net.o
2121obj-$(CONFIG_IP_SET_HASH_NETPORT) += ip_set_hash_netport.o
22+ obj-$(CONFIG_IP_SET_HASH_NETIFACE) += ip_set_hash_netiface.o
2223
2324# list types
2425obj-$(CONFIG_IP_SET_LIST_SET) += ip_set_list_set.o
You can’t perform that action at this time.
0 commit comments