Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255579
b: refs/heads/master
c: e385357
h: refs/heads/master
i:
  255577: 0d6742b
  255575: c5ec092
v: v3
  • Loading branch information
Jozsef Kadlecsik authored and Patrick McHardy committed Jun 16, 2011
1 parent 4a85c56 commit ffe46e1
Show file tree
Hide file tree
Showing 6 changed files with 785 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b03a5ef49c01515387133ac5bd47073fae56318
refs/heads/master: e385357a2f214e4d4e79c6118f1bede2572e0701
5 changes: 5 additions & 0 deletions trunk/include/linux/netfilter/ipset/ip_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ enum {
IPSET_ATTR_IP2,
IPSET_ATTR_CIDR2,
IPSET_ATTR_IP2_TO,
IPSET_ATTR_IFACE,
__IPSET_ATTR_ADT_MAX,
};
#define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1)
Expand Down Expand Up @@ -153,6 +154,8 @@ enum ipset_cmd_flags {
enum ipset_cadt_flags {
IPSET_FLAG_BIT_BEFORE = 0,
IPSET_FLAG_BEFORE = (1 << IPSET_FLAG_BIT_BEFORE),
IPSET_FLAG_BIT_PHYSDEV = 1,
IPSET_FLAG_PHYSDEV = (1 << IPSET_FLAG_BIT_PHYSDEV),
};

/* Commands with settype-specific attributes */
Expand Down Expand Up @@ -212,6 +215,8 @@ enum ip_set_feature {
IPSET_TYPE_IP2 = (1 << IPSET_TYPE_IP2_FLAG),
IPSET_TYPE_NAME_FLAG = 4,
IPSET_TYPE_NAME = (1 << IPSET_TYPE_NAME_FLAG),
IPSET_TYPE_IFACE_FLAG = 5,
IPSET_TYPE_IFACE = (1 << IPSET_TYPE_IFACE_FLAG),
/* Strictly speaking not a feature, but a flag for dumping:
* this settype must be dumped last */
IPSET_DUMP_LAST_FLAG = 7,
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/netfilter/ipset/ip_set_ahash.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ struct ip_set_hash {
#ifdef IP_SET_HASH_WITH_NETMASK
u8 netmask; /* netmask value for subnets to store */
#endif
#ifdef IP_SET_HASH_WITH_RBTREE
struct rb_root rbtree;
#endif
#ifdef IP_SET_HASH_WITH_NETS
struct ip_set_hash_nets nets[0]; /* book-keeping of prefixes */
#endif
Expand Down Expand Up @@ -200,6 +203,9 @@ ip_set_hash_destroy(struct ip_set *set)
del_timer_sync(&h->gc);

ahash_destroy(h->table);
#ifdef IP_SET_HASH_WITH_RBTREE
rbtree_destroy(&h->rbtree);
#endif
kfree(h);

set->data = NULL;
Expand Down
10 changes: 10 additions & 0 deletions trunk/net/netfilter/ipset/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ config IP_SET_HASH_NETPORT

To compile it as a module, choose M here. If unsure, say N.

config IP_SET_HASH_NETIFACE
tristate "hash:net,iface set support"
depends on IP_SET
help
This option adds the hash:net,iface set type support, by which
one can store IPv4/IPv6 network address/prefix and
interface name pairs as elements in a set.

To compile it as a module, choose M here. If unsure, say N.

config IP_SET_LIST_SET
tristate "list:set set support"
depends on IP_SET
Expand Down
1 change: 1 addition & 0 deletions trunk/net/netfilter/ipset/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ obj-$(CONFIG_IP_SET_HASH_IPPORTIP) += ip_set_hash_ipportip.o
obj-$(CONFIG_IP_SET_HASH_IPPORTNET) += ip_set_hash_ipportnet.o
obj-$(CONFIG_IP_SET_HASH_NET) += ip_set_hash_net.o
obj-$(CONFIG_IP_SET_HASH_NETPORT) += ip_set_hash_netport.o
obj-$(CONFIG_IP_SET_HASH_NETIFACE) += ip_set_hash_netiface.o

# list types
obj-$(CONFIG_IP_SET_LIST_SET) += ip_set_list_set.o
Loading

0 comments on commit ffe46e1

Please sign in to comment.