ipset (kernel): add set match "inner" flag support
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v4 1/2 ipset (kernel): add set match "inner" flag support
This patch implements "inner" flag support to all registered ipset types.
Revision history:
v1 * initial revision
v2 * redundant code removed;
* use the new ipv[46]addr[ptr] and ip_set_get*port functions;
v3 * revert to the old ip[46]addrptr and ip_set_get_ip[46]_port
function names;
v4 * add inner flag version support on all ipsets;
--- kernel/net/netfilter/ipset/ip_set_bitmap_ip.c | 10 ++++++-- kernel/net/netfilter/ipset/ip_set_bitmap_ipmac.c | 10 ++++++-- kernel/net/netfilter/ipset/ip_set_bitmap_port.c | 4 ++- kernel/net/netfilter/ipset/ip_set_hash_ip.c | 13 +++++++--- kernel/net/netfilter/ipset/ip_set_hash_ipport.c | 19 ++++++++------ kernel/net/netfilter/ipset/ip_set_hash_ipportip.c | 25 ++++++++++++------- kernel/net/netfilter/ipset/ip_set_hash_ipportnet.c | 29 ++++++++++++++-------- kernel/net/netfilter/ipset/ip_set_hash_net.c | 13 +++++++--- kernel/net/netfilter/ipset/ip_set_hash_netiface.c | 13 +++++++--- kernel/net/netfilter/ipset/ip_set_hash_netport.c | 24 ++++++++++-------- 10 files changed, 107 insertions(+), 53 deletions(-)
kernel/net/netfilter/ipset/ip_set_bitmap_ip.c +8 -2
@@ -26,7 +26,8 @@#include <linux/netfilter/ipset/ip_set_bitmap.h> #define IPSET_TYPE_REV_MIN 0 -#define IPSET_TYPE_REV_MAX 1/* Counter support added */ +/* 1 Counter support added */ +#define IPSET_TYPE_REV_MAX 2/* Inner flag support added */ MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Jozsef Kadlecsik <[email protected]>" );
@@ -115,8 +116,13 @@ bitmap_ip_kadt(struct ip_set *set, const struct sk_buff *skb,struct bitmap_ip_adt_elem e = { };struct ip_set_ext ext =IP_SET_INIT_KEXT (skb, opt, map);u32 ip; +__be32 _ip; - ip =ntohl (ip4addr (skb, opt->flags &IPSET_DIM_ONE_SRC )); +if (!ip4addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &_ip)) +return -EINVAL ; + + ip =ntohl (_ip);if (ip < map->first_ip || ip > map->last_ip)return -IPSET_ERR_BITMAP_RANGE ;
kernel/net/netfilter/ipset/ip_set_bitmap_ipmac.c +8 -2
@@ -26,7 +26,8 @@#include <linux/netfilter/ipset/ip_set_bitmap.h> #define IPSET_TYPE_REV_MIN 0 -#define IPSET_TYPE_REV_MAX 1/* Counter support added */ +/* 1 Counter support added */ +#define IPSET_TYPE_REV_MAX 2/* Inner flag support added */ MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Jozsef Kadlecsik <[email protected]>" );
@@ -218,12 +219,17 @@ bitmap_ipmac_kadt(struct ip_set *set, const struct sk_buff *skb,struct bitmap_ipmac_adt_elem e = {};struct ip_set_ext ext =IP_SET_INIT_KEXT (skb, opt, map);u32 ip; +__be32 _ip;/* MAC can be src only */ if (!(opt->flags &IPSET_DIM_TWO_SRC ))return 0 ; - ip =ntohl (ip4addr (skb, opt->flags &IPSET_DIM_ONE_SRC )); +if (!ip4addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &_ip)) +return -EINVAL ; + + ip =ntohl (_ip);if (ip < map->first_ip || ip > map->last_ip)return -IPSET_ERR_BITMAP_RANGE ;
kernel/net/netfilter/ipset/ip_set_bitmap_port.c +3 -1
@@ -21,7 +21,8 @@#include <linux/netfilter/ipset/ip_set_getport.h> #define IPSET_TYPE_REV_MIN 0 -#define IPSET_TYPE_REV_MAX 1/* Counter support added */ +/* 1 Counter support added */ +#define IPSET_TYPE_REV_MAX 2/* Inner flag support added */ MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Jozsef Kadlecsik <[email protected]>" );
@@ -111,6 +112,7 @@ bitmap_port_kadt(struct ip_set *set, const struct sk_buff *skb,u16 port =0 ;if (!ip_set_get_ip_port (skb, opt->family, + opt->cmdflags &IPSET_FLAG_INNER , opt->flags &IPSET_DIM_ONE_SRC , &__port))return -EINVAL ;
kernel/net/netfilter/ipset/ip_set_hash_ip.c +10 -3
@@ -24,7 +24,8 @@#include <linux/netfilter/ipset/ip_set_hash.h> #define IPSET_TYPE_REV_MIN 0 -#define IPSET_TYPE_REV_MAX 1/* Counters support */ +/* 1 Counter support added */ +#define IPSET_TYPE_REV_MAX 2/* Inner flag support added */ MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Jozsef Kadlecsik <[email protected]>" );
@@ -102,7 +103,10 @@ hash_ip4_kadt(struct ip_set *set, const struct sk_buff *skb,struct ip_set_ext ext =IP_SET_INIT_KEXT (skb, opt, h);__be32 ip; -ip4addrptr (skb, opt->flags &IPSET_DIM_ONE_SRC , &ip); +if (!ip4addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &ip)) +return -EINVAL ; + ip &=ip_set_netmask (h->netmask);if (ip ==0 )return -EINVAL ;
@@ -255,7 +259,10 @@ hash_ip6_kadt(struct ip_set *set, const struct sk_buff *skb,struct hash_ip6_elem e = {};struct ip_set_ext ext =IP_SET_INIT_KEXT (skb, opt, h); -ip6addrptr (skb, opt->flags &IPSET_DIM_ONE_SRC , &e.ip.in6); +if (!ip6addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &e.ip.in6)) +return -EINVAL ; +hash_ip6_netmask (&e.ip, h->netmask);if (ipv6_addr_any (&e.ip.in6))return -EINVAL ;
kernel/net/netfilter/ipset/ip_set_hash_ipport.c +12 -7
@@ -26,7 +26,8 @@#define IPSET_TYPE_REV_MIN 0/* 1 SCTP and UDPLITE support added */ -#define IPSET_TYPE_REV_MAX 2/* Counters support added */ +/* 2 Counter support added */ +#define IPSET_TYPE_REV_MAX 3/* Inner flag support added */ MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Jozsef Kadlecsik <[email protected]>" );
@@ -121,11 +122,13 @@ hash_ipport4_kadt(struct ip_set *set, const struct sk_buff *skb,struct hash_ipport4_elem e = { };struct ip_set_ext ext =IP_SET_INIT_KEXT (skb, opt, h); -if (!ip_set_get_ip4_port (skb, opt->flags &IPSET_DIM_TWO_SRC , - &e.port, &e.proto)) +if (!ip_set_get_ip4_port (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_TWO_SRC , &e.port, + &e.proto) || + !ip4addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &e.ip))return -EINVAL ; -ip4addrptr (skb, opt->flags &IPSET_DIM_ONE_SRC , &e.ip);return adtfn (set, &e, &ext, &opt->ext, opt->cmdflags); }
@@ -311,11 +314,13 @@ hash_ipport6_kadt(struct ip_set *set, const struct sk_buff *skb,struct hash_ipport6_elem e = { };struct ip_set_ext ext =IP_SET_INIT_KEXT (skb, opt, h); -if (!ip_set_get_ip6_port (skb, opt->flags &IPSET_DIM_TWO_SRC , - &e.port, &e.proto)) +if (!ip_set_get_ip6_port (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_TWO_SRC , &e.port, + &e.proto) || + !ip6addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &e.ip.in6))return -EINVAL ; -ip6addrptr (skb, opt->flags &IPSET_DIM_ONE_SRC , &e.ip.in6);return adtfn (set, &e, &ext, &opt->ext, opt->cmdflags); }
kernel/net/netfilter/ipset/ip_set_hash_ipportip.c +16 -9
@@ -26,7 +26,8 @@#define IPSET_TYPE_REV_MIN 0/* 1 SCTP and UDPLITE support added */ -#define IPSET_TYPE_REV_MAX 2/* Counters support added */ +/* 2 Counter support added */ +#define IPSET_TYPE_REV_MAX 3/* Inner flag support added */ MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Jozsef Kadlecsik <[email protected]>" );
@@ -125,12 +126,15 @@ hash_ipportip4_kadt(struct ip_set *set, const struct sk_buff *skb,struct hash_ipportip4_elem e = { };struct ip_set_ext ext =IP_SET_INIT_KEXT (skb, opt, h); -if (!ip_set_get_ip4_port (skb, opt->flags &IPSET_DIM_TWO_SRC , - &e.port, &e.proto)) +if (!ip_set_get_ip4_port (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_TWO_SRC , &e.port, + &e.proto) || + !ip4addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &e.ip) || + !ip4addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_THREE_SRC , &e.ip2))return -EINVAL ; -ip4addrptr (skb, opt->flags &IPSET_DIM_ONE_SRC , &e.ip); -ip4addrptr (skb, opt->flags &IPSET_DIM_THREE_SRC , &e.ip2);return adtfn (set, &e, &ext, &opt->ext, opt->cmdflags); }
@@ -324,12 +328,15 @@ hash_ipportip6_kadt(struct ip_set *set, const struct sk_buff *skb,struct hash_ipportip6_elem e = { };struct ip_set_ext ext =IP_SET_INIT_KEXT (skb, opt, h); -if (!ip_set_get_ip6_port (skb, opt->flags &IPSET_DIM_TWO_SRC , - &e.port, &e.proto)) +if (!ip_set_get_ip6_port (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_TWO_SRC , &e.port, + &e.proto) || + !ip6addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &e.ip.in6) || + !ip6addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_THREE_SRC , &e.ip2.in6))return -EINVAL ; -ip6addrptr (skb, opt->flags &IPSET_DIM_ONE_SRC , &e.ip.in6); -ip6addrptr (skb, opt->flags &IPSET_DIM_THREE_SRC , &e.ip2.in6);return adtfn (set, &e, &ext, &opt->ext, opt->cmdflags); }
kernel/net/netfilter/ipset/ip_set_hash_ipportnet.c +18 -11
@@ -25,10 +25,11 @@#include <linux/netfilter/ipset/ip_set_hash.h> #define IPSET_TYPE_REV_MIN 0 -/* 1 SCTP and UDPLITE support added */ +/* 1 SCTP and UDPLITE support added */ /* 2 Range as input support for IPv4 added */ -/* 3 nomatch flag support added */ -#define IPSET_TYPE_REV_MAX 4/* Counters support added */ +/* 3 nomatch flag support added */ +/* 4 Counter support added */ +#define IPSET_TYPE_REV_MAX 5/* Inner flag support added */ MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Jozsef Kadlecsik <[email protected]>" );
@@ -177,12 +178,15 @@ hash_ipportnet4_kadt(struct ip_set *set, const struct sk_buff *skb,if (adt ==IPSET_TEST ) e.cidr =HOST_MASK -1 ; -if (!ip_set_get_ip4_port (skb, opt->flags &IPSET_DIM_TWO_SRC , - &e.port, &e.proto)) +if (!ip_set_get_ip4_port (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_TWO_SRC , &e.port, + &e.proto) || + !ip4addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &e.ip) || + !ip4addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_THREE_SRC , &e.ip2))return -EINVAL ; -ip4addrptr (skb, opt->flags &IPSET_DIM_ONE_SRC , &e.ip); -ip4addrptr (skb, opt->flags &IPSET_DIM_THREE_SRC , &e.ip2); e.ip2 &=ip_set_netmask (e.cidr +1 );return adtfn (set, &e, &ext, &opt->ext, opt->cmdflags);
@@ -461,12 +465,15 @@ hash_ipportnet6_kadt(struct ip_set *set, const struct sk_buff *skb,if (adt ==IPSET_TEST ) e.cidr =HOST_MASK -1 ; -if (!ip_set_get_ip6_port (skb, opt->flags &IPSET_DIM_TWO_SRC , - &e.port, &e.proto)) +if (!ip_set_get_ip6_port (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_TWO_SRC , &e.port, + &e.proto) || + !ip6addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &e.ip.in6) || + !ip6addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_THREE_SRC , &e.ip2.in6))return -EINVAL ; -ip6addrptr (skb, opt->flags &IPSET_DIM_ONE_SRC , &e.ip.in6); -ip6addrptr (skb, opt->flags &IPSET_DIM_THREE_SRC , &e.ip2.in6);ip6_netmask (&e.ip2, e.cidr +1 );return adtfn (set, &e, &ext, &opt->ext, opt->cmdflags);
kernel/net/netfilter/ipset/ip_set_hash_net.c +9 -4
@@ -24,8 +24,9 @@#define IPSET_TYPE_REV_MIN 0/* 1 Range as input support for IPv4 added */ -/* 2 nomatch flag support added */ -#define IPSET_TYPE_REV_MAX 3/* Counters support added */ +/* 2 nomatch flag support added */ +/* 3 Counter support added */ +#define IPSET_TYPE_REV_MAX 4/* Inner flag support added */ MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Jozsef Kadlecsik <[email protected]>" );
@@ -151,8 +152,10 @@ hash_net4_kadt(struct ip_set *set, const struct sk_buff *skb,return -EINVAL ;if (adt ==IPSET_TEST ) e.cidr =HOST_MASK ; +if (!ip4addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &e.ip)) +return -EINVAL ; -ip4addrptr (skb, opt->flags &IPSET_DIM_ONE_SRC , &e.ip); e.ip &=ip_set_netmask (e.cidr);return adtfn (set, &e, &ext, &opt->ext, opt->cmdflags);
@@ -346,8 +349,10 @@ hash_net6_kadt(struct ip_set *set, const struct sk_buff *skb,return -EINVAL ;if (adt ==IPSET_TEST ) e.cidr =HOST_MASK ; +if (!ip6addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &e.ip.in6)) +return -EINVAL ; -ip6addrptr (skb, opt->flags &IPSET_DIM_ONE_SRC , &e.ip.in6);ip6_netmask (&e.ip, e.cidr);return adtfn (set, &e, &ext, &opt->ext, opt->cmdflags);
kernel/net/netfilter/ipset/ip_set_hash_netiface.c +9 -4
@@ -25,8 +25,9 @@#define IPSET_TYPE_REV_MIN 0/* 1 nomatch flag support added */ -/* 2 /0 support added */ -#define IPSET_TYPE_REV_MAX 3/* Counters support added */ +/* 2 /0 support added */ +/* 3 Counter support added */ +#define IPSET_TYPE_REV_MAX 4/* Inner flag support added */ MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Jozsef Kadlecsik <[email protected]>" );
@@ -275,8 +276,10 @@ hash_netiface4_kadt(struct ip_set *set, const struct sk_buff *skb,return -EINVAL ;if (adt ==IPSET_TEST ) e.cidr =HOST_MASK ; +if (!ip4addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &e.ip)) +return -EINVAL ; -ip4addrptr (skb, opt->flags &IPSET_DIM_ONE_SRC , &e.ip); e.ip &=ip_set_netmask (e.cidr);#define IFACE (dir) (par->dir ? par->dir->name : NULL)
@@ -544,8 +547,10 @@ hash_netiface6_kadt(struct ip_set *set, const struct sk_buff *skb,return -EINVAL ;if (adt ==IPSET_TEST ) e.cidr =HOST_MASK ; +if (!ip6addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &e.ip.in6)) +return -EINVAL ; -ip6addrptr (skb, opt->flags &IPSET_DIM_ONE_SRC , &e.ip.in6);ip6_netmask (&e.ip, e.cidr);if (opt->cmdflags &IPSET_FLAG_PHYSDEV ) {
kernel/net/netfilter/ipset/ip_set_hash_netport.c +14 -10
@@ -24,10 +24,11 @@#include <linux/netfilter/ipset/ip_set_hash.h> #define IPSET_TYPE_REV_MIN 0 -/* 1 SCTP and UDPLITE support added */ +/* 1 SCTP and UDPLITE support added */ /* 2 Range as input support for IPv4 added */ -/* 3 nomatch flag support added */ -#define IPSET_TYPE_REV_MAX 4/* Counters support added */ +/* 3 nomatch flag support added */ +/* 4 Counter support added */ +#define IPSET_TYPE_REV_MAX 5/* Inner flag support added */ MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Jozsef Kadlecsik <[email protected]>" );
@@ -169,11 +170,13 @@ hash_netport4_kadt(struct ip_set *set, const struct sk_buff *skb,if (adt ==IPSET_TEST ) e.cidr =HOST_MASK -1 ; -if (!ip_set_get_ip4_port (skb, opt->flags &IPSET_DIM_TWO_SRC , - &e.port, &e.proto)) +if (!ip_set_get_ip4_port (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_TWO_SRC , &e.port, + &e.proto) || + !ip4addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &e.ip))return -EINVAL ; -ip4addrptr (skb, opt->flags &IPSET_DIM_ONE_SRC , &e.ip); e.ip &=ip_set_netmask (e.cidr +1 );return adtfn (set, &e, &ext, &opt->ext, opt->cmdflags);
@@ -413,12 +416,13 @@ hash_netport6_kadt(struct ip_set *set, const struct sk_buff *skb,if (adt ==IPSET_TEST ) e.cidr =HOST_MASK -1 ; - -if (!ip_set_get_ip6_port (skb, opt->flags &IPSET_DIM_TWO_SRC , - &e.port, &e.proto)) +if (!ip_set_get_ip6_port (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_TWO_SRC , &e.port, + &e.proto) || + !ip6addrptr (skb, opt->cmdflags &IPSET_FLAG_INNER , + opt->flags &IPSET_DIM_ONE_SRC , &e.ip.in6))return -EINVAL ; -ip6addrptr (skb, opt->flags &IPSET_DIM_ONE_SRC , &e.ip.in6);ip6_netmask (&e.ip, e.cidr +1 );return adtfn (set, &e, &ext, &opt->ext, opt->cmdflags);
PATCH v4 2/2 ipset (userspace): add "inner" flag version support
In reply to a message not in the archiveThis patch adds "inner" flag version support to all registered ipset types.
Revision history:
v1 * initial revision
--- lib/ipset_bitmap_ip.c | 45 +++++++++++++++++++++++++ lib/ipset_bitmap_ipmac.c | 51 ++++++++++++++++++++++++++++ lib/ipset_bitmap_port.c | 44 ++++++++++++++++++++++++ lib/ipset_hash_ip.c | 44 ++++++++++++++++++++++++ lib/ipset_hash_ipport.c | 63 ++++++++++++++++++++++++++++++++++ lib/ipset_hash_ipportip.c | 74 ++++++++++++++++++++++++++++++++++++++++ lib/ipset_hash_ipportnet.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++ lib/ipset_hash_net.c | 49 +++++++++++++++++++++++++++ lib/ipset_hash_netiface.c | 64 +++++++++++++++++++++++++++++++++++ lib/ipset_hash_netport.c | 69 +++++++++++++++++++++++++++++++++++++ 10 files changed, 587 insertions(+)
lib/ipset_bitmap_ip.c +45 -0
@@ -201,9 +201,54 @@ static struct ipset_type ipset_bitmap_ip1 = { .description = "counters support", }; +static struct ipset_type ipset_bitmap_ip2 = { + .name ="bitmap:ip" , + .alias = {"ipmap" ,NULL }, + .revision =2 , + .family =NFPROTO_IPV4 , + .dimension =IPSET_DIM_ONE , + .elem = { + [IPSET_DIM_ONE -1 ] = { + .parse = ipset_parse_ip, + .print = ipset_print_ip, + .opt =IPSET_OPT_IP + }, + }, + .args = { + [IPSET_CREATE ] = bitmap_ip_create_args1, + [IPSET_ADD ] = bitmap_ip_add_args1, + }, + .mandatory = { + [IPSET_CREATE ] =IPSET_FLAG (IPSET_OPT_IP ) + |IPSET_FLAG (IPSET_OPT_IP_TO ), + [IPSET_ADD ] =IPSET_FLAG (IPSET_OPT_IP ), + [IPSET_DEL ] =IPSET_FLAG (IPSET_OPT_IP ), + [IPSET_TEST ] =IPSET_FLAG (IPSET_OPT_IP ), + }, + .full = { + [IPSET_CREATE ] =IPSET_FLAG (IPSET_OPT_IP ) + |IPSET_FLAG (IPSET_OPT_IP_TO ) + |IPSET_FLAG (IPSET_OPT_NETMASK ) + |IPSET_FLAG (IPSET_OPT_TIMEOUT ) + |IPSET_FLAG (IPSET_OPT_COUNTERS ), + [IPSET_ADD ] =IPSET_FLAG (IPSET_OPT_IP ) + |IPSET_FLAG (IPSET_OPT_IP_TO ) + |IPSET_FLAG (IPSET_OPT_TIMEOUT ) + |IPSET_FLAG (IPSET_OPT_PACKETS ) + |IPSET_FLAG (IPSET_OPT_BYTES ), + [IPSET_DEL ] =IPSET_FLAG (IPSET_OPT_IP ) + |IPSET_FLAG (IPSET_OPT_IP_TO ), + [IPSET_TEST ] =IPSET_FLAG (IPSET_OPT_IP ), + }, + + .usage = bitmap_ip_usage1, + .description ="inner flag support" , +}; +void _init (void );void _init (void ) {ipset_type_add (&ipset_bitmap_ip0);ipset_type_add (&ipset_bitmap_ip1); +ipset_type_add (&ipset_bitmap_ip2); }
lib/ipset_bitmap_ipmac.c +51 -0
60 lines not on this page · raw message
lib/ipset_bitmap_port.c +44 -0
53 lines not on this page · raw message
lib/ipset_hash_ip.c +44 -0
53 lines not on this page · raw message
lib/ipset_hash_ipport.c +63 -0
72 lines not on this page · raw message
lib/ipset_hash_ipportip.c +74 -0
83 lines not on this page · raw message
lib/ipset_hash_ipportnet.c +84 -0
94 lines not on this page · raw message
lib/ipset_hash_net.c +49 -0
59 lines not on this page · raw message
lib/ipset_hash_netiface.c +64 -0
74 lines not on this page · raw message
lib/ipset_hash_netport.c +69 -0
79 lines not on this page · raw message