mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2026-02-16 03:14:12 +01:00
ipset: update to 6.9.1-genl
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include <libipset/utils.h> /* STREQ */
|
||||
|
||||
static char program_name[] = "ipset";
|
||||
static char program_version[] = "6.8-genl-xta";
|
||||
static char program_version[] = "6.9.1-genl-xta";
|
||||
|
||||
static struct ipset_session *session;
|
||||
static uint32_t restore_line;
|
||||
@@ -324,9 +324,9 @@ static const char *
|
||||
session_family(void)
|
||||
{
|
||||
switch (ipset_data_family(ipset_session_data(session))) {
|
||||
case AF_INET:
|
||||
case NFPROTO_IPV4:
|
||||
return "inet";
|
||||
case AF_INET6:
|
||||
case NFPROTO_IPV6:
|
||||
return "inet6";
|
||||
default:
|
||||
return "unspec";
|
||||
@@ -581,10 +581,10 @@ parse_commandline(int argc, char *argv[])
|
||||
type->name, type->usage);
|
||||
if (type->usagefn)
|
||||
type->usagefn();
|
||||
if (type->family == AF_UNSPEC)
|
||||
if (type->family == NFPROTO_UNSPEC)
|
||||
printf("\nType %s is family neutral.\n",
|
||||
type->name);
|
||||
else if (type->family == AF_INET46)
|
||||
else if (type->family == NFPROTO_IPSET_IPV46)
|
||||
printf("\nType %s supports INET "
|
||||
"and INET6.\n",
|
||||
type->name);
|
||||
@@ -592,7 +592,7 @@ parse_commandline(int argc, char *argv[])
|
||||
printf("\nType %s supports family "
|
||||
"%s only.\n",
|
||||
type->name,
|
||||
type->family == AF_INET
|
||||
type->family == NFPROTO_IPV4
|
||||
? "INET" : "INET6");
|
||||
} else {
|
||||
printf("\nSupported set types:\n");
|
||||
|
||||
@@ -60,10 +60,10 @@ struct ipset_type ipset_bitmap_ip0 = {
|
||||
.name = "bitmap:ip",
|
||||
.alias = { "ipmap", NULL },
|
||||
.revision = 0,
|
||||
.family = AF_INET,
|
||||
.family = NFPROTO_IPV4,
|
||||
.dimension = IPSET_DIM_ONE,
|
||||
.elem = {
|
||||
[IPSET_DIM_ONE] = {
|
||||
[IPSET_DIM_ONE - 1] = {
|
||||
.parse = ipset_parse_ip,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP
|
||||
|
||||
@@ -57,16 +57,16 @@ struct ipset_type ipset_bitmap_ipmac0 = {
|
||||
.name = "bitmap:ip,mac",
|
||||
.alias = { "macipmap", NULL },
|
||||
.revision = 0,
|
||||
.family = AF_INET,
|
||||
.family = NFPROTO_IPV4,
|
||||
.dimension = IPSET_DIM_TWO,
|
||||
.last_elem_optional = true,
|
||||
.elem = {
|
||||
[IPSET_DIM_ONE] = {
|
||||
[IPSET_DIM_ONE - 1] = {
|
||||
.parse = ipset_parse_single_ip,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP
|
||||
},
|
||||
[IPSET_DIM_TWO] = {
|
||||
[IPSET_DIM_TWO - 1] = {
|
||||
.parse = ipset_parse_ether,
|
||||
.print = ipset_print_ether,
|
||||
.opt = IPSET_OPT_ETHER
|
||||
|
||||
@@ -51,10 +51,10 @@ struct ipset_type ipset_bitmap_port0 = {
|
||||
.name = "bitmap:port",
|
||||
.alias = { "portmap", NULL },
|
||||
.revision = 0,
|
||||
.family = AF_UNSPEC,
|
||||
.family = NFPROTO_UNSPEC,
|
||||
.dimension = IPSET_DIM_ONE,
|
||||
.elem = {
|
||||
[IPSET_DIM_ONE] = {
|
||||
[IPSET_DIM_ONE - 1] = {
|
||||
.parse = ipset_parse_tcp_port,
|
||||
.print = ipset_print_port,
|
||||
.opt = IPSET_OPT_PORT
|
||||
|
||||
@@ -83,10 +83,10 @@ struct ipset_type ipset_hash_ip0 = {
|
||||
.name = "hash:ip",
|
||||
.alias = { "iphash", NULL },
|
||||
.revision = 0,
|
||||
.family = AF_INET46,
|
||||
.family = NFPROTO_IPSET_IPV46,
|
||||
.dimension = IPSET_DIM_ONE,
|
||||
.elem = {
|
||||
[IPSET_DIM_ONE] = {
|
||||
[IPSET_DIM_ONE - 1] = {
|
||||
.parse = ipset_parse_ip4_single6,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP
|
||||
|
||||
@@ -89,15 +89,15 @@ struct ipset_type ipset_hash_ipport1 = {
|
||||
.name = "hash:ip,port",
|
||||
.alias = { "ipporthash", NULL },
|
||||
.revision = 1,
|
||||
.family = AF_INET46,
|
||||
.family = NFPROTO_IPSET_IPV46,
|
||||
.dimension = IPSET_DIM_TWO,
|
||||
.elem = {
|
||||
[IPSET_DIM_ONE] = {
|
||||
[IPSET_DIM_ONE - 1] = {
|
||||
.parse = ipset_parse_ip4_single6,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP
|
||||
},
|
||||
[IPSET_DIM_TWO] = {
|
||||
[IPSET_DIM_TWO - 1] = {
|
||||
.parse = ipset_parse_proto_port,
|
||||
.print = ipset_print_proto_port,
|
||||
.opt = IPSET_OPT_PORT
|
||||
|
||||
@@ -89,20 +89,20 @@ struct ipset_type ipset_hash_ipportip1 = {
|
||||
.name = "hash:ip,port,ip",
|
||||
.alias = { "ipportiphash", NULL },
|
||||
.revision = 1,
|
||||
.family = AF_INET46,
|
||||
.family = NFPROTO_IPSET_IPV46,
|
||||
.dimension = IPSET_DIM_THREE,
|
||||
.elem = {
|
||||
[IPSET_DIM_ONE] = {
|
||||
[IPSET_DIM_ONE - 1] = {
|
||||
.parse = ipset_parse_ip4_single6,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP
|
||||
},
|
||||
[IPSET_DIM_TWO] = {
|
||||
[IPSET_DIM_TWO - 1] = {
|
||||
.parse = ipset_parse_proto_port,
|
||||
.print = ipset_print_proto_port,
|
||||
.opt = IPSET_OPT_PORT
|
||||
},
|
||||
[IPSET_DIM_THREE] = {
|
||||
[IPSET_DIM_THREE - 1] = {
|
||||
.parse = ipset_parse_single_ip,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP2
|
||||
|
||||
@@ -90,20 +90,20 @@ struct ipset_type ipset_hash_ipportnet1 = {
|
||||
.name = "hash:ip,port,net",
|
||||
.alias = { "ipportnethash", NULL },
|
||||
.revision = 1,
|
||||
.family = AF_INET46,
|
||||
.family = NFPROTO_IPSET_IPV46,
|
||||
.dimension = IPSET_DIM_THREE,
|
||||
.elem = {
|
||||
[IPSET_DIM_ONE] = {
|
||||
[IPSET_DIM_ONE - 1] = {
|
||||
.parse = ipset_parse_ip4_single6,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP
|
||||
},
|
||||
[IPSET_DIM_TWO] = {
|
||||
[IPSET_DIM_TWO - 1] = {
|
||||
.parse = ipset_parse_proto_port,
|
||||
.print = ipset_print_proto_port,
|
||||
.opt = IPSET_OPT_PORT
|
||||
},
|
||||
[IPSET_DIM_THREE] = {
|
||||
[IPSET_DIM_THREE - 1] = {
|
||||
.parse = ipset_parse_ipnet,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP2
|
||||
@@ -180,20 +180,20 @@ struct ipset_type ipset_hash_ipportnet2 = {
|
||||
.name = "hash:ip,port,net",
|
||||
.alias = { "ipportnethash", NULL },
|
||||
.revision = 2,
|
||||
.family = AF_INET46,
|
||||
.family = NFPROTO_IPSET_IPV46,
|
||||
.dimension = IPSET_DIM_THREE,
|
||||
.elem = {
|
||||
[IPSET_DIM_ONE] = {
|
||||
[IPSET_DIM_ONE - 1] = {
|
||||
.parse = ipset_parse_ip4_single6,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP
|
||||
},
|
||||
[IPSET_DIM_TWO] = {
|
||||
[IPSET_DIM_TWO - 1] = {
|
||||
.parse = ipset_parse_proto_port,
|
||||
.print = ipset_print_proto_port,
|
||||
.opt = IPSET_OPT_PORT
|
||||
},
|
||||
[IPSET_DIM_THREE] = {
|
||||
[IPSET_DIM_THREE - 1] = {
|
||||
.parse = ipset_parse_ip4_net6,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP2
|
||||
|
||||
@@ -73,10 +73,10 @@ struct ipset_type ipset_hash_net0 = {
|
||||
.name = "hash:net",
|
||||
.alias = { "nethash", NULL },
|
||||
.revision = 0,
|
||||
.family = AF_INET46,
|
||||
.family = NFPROTO_IPSET_IPV46,
|
||||
.dimension = IPSET_DIM_ONE,
|
||||
.elem = {
|
||||
[IPSET_DIM_ONE] = {
|
||||
[IPSET_DIM_ONE - 1] = {
|
||||
.parse = ipset_parse_ipnet,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP
|
||||
@@ -125,10 +125,10 @@ struct ipset_type ipset_hash_net1 = {
|
||||
.name = "hash:net",
|
||||
.alias = { "nethash", NULL },
|
||||
.revision = 1,
|
||||
.family = AF_INET46,
|
||||
.family = NFPROTO_IPSET_IPV46,
|
||||
.dimension = IPSET_DIM_ONE,
|
||||
.elem = {
|
||||
[IPSET_DIM_ONE] = {
|
||||
[IPSET_DIM_ONE - 1] = {
|
||||
.parse = ipset_parse_ip4_net6,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP
|
||||
|
||||
@@ -66,15 +66,15 @@ struct ipset_type ipset_hash_netiface0 = {
|
||||
.name = "hash:net,iface",
|
||||
.alias = { "netifacehash", NULL },
|
||||
.revision = 0,
|
||||
.family = AF_INET46,
|
||||
.family = NFPROTO_IPSET_IPV46,
|
||||
.dimension = IPSET_DIM_TWO,
|
||||
.elem = {
|
||||
[IPSET_DIM_ONE] = {
|
||||
[IPSET_DIM_ONE - 1] = {
|
||||
.parse = ipset_parse_ip4_net6,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP
|
||||
},
|
||||
[IPSET_DIM_TWO] = {
|
||||
[IPSET_DIM_TWO - 1] = {
|
||||
.parse = ipset_parse_iface,
|
||||
.print = ipset_print_iface,
|
||||
.opt = IPSET_OPT_IFACE
|
||||
|
||||
@@ -67,15 +67,15 @@ struct ipset_type ipset_hash_netport1 = {
|
||||
.name = "hash:net,port",
|
||||
.alias = { "netporthash", NULL },
|
||||
.revision = 1,
|
||||
.family = AF_INET46,
|
||||
.family = NFPROTO_IPSET_IPV46,
|
||||
.dimension = IPSET_DIM_TWO,
|
||||
.elem = {
|
||||
[IPSET_DIM_ONE] = {
|
||||
[IPSET_DIM_ONE - 1] = {
|
||||
.parse = ipset_parse_ipnet,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP
|
||||
},
|
||||
[IPSET_DIM_TWO] = {
|
||||
[IPSET_DIM_TWO - 1] = {
|
||||
.parse = ipset_parse_proto_port,
|
||||
.print = ipset_print_proto_port,
|
||||
.opt = IPSET_OPT_PORT
|
||||
@@ -141,15 +141,15 @@ struct ipset_type ipset_hash_netport2 = {
|
||||
.name = "hash:net,port",
|
||||
.alias = { "netporthash", NULL },
|
||||
.revision = 2,
|
||||
.family = AF_INET46,
|
||||
.family = NFPROTO_IPSET_IPV46,
|
||||
.dimension = IPSET_DIM_TWO,
|
||||
.elem = {
|
||||
[IPSET_DIM_ONE] = {
|
||||
[IPSET_DIM_ONE - 1] = {
|
||||
.parse = ipset_parse_ip4_net6,
|
||||
.print = ipset_print_ip,
|
||||
.opt = IPSET_OPT_IP
|
||||
},
|
||||
[IPSET_DIM_TWO] = {
|
||||
[IPSET_DIM_TWO - 1] = {
|
||||
.parse = ipset_parse_proto_port,
|
||||
.print = ipset_print_proto_port,
|
||||
.opt = IPSET_OPT_PORT
|
||||
|
||||
@@ -50,10 +50,10 @@ struct ipset_type ipset_list_set0 = {
|
||||
.name = "list:set",
|
||||
.alias = { "setlist", NULL },
|
||||
.revision = 0,
|
||||
.family = AF_UNSPEC,
|
||||
.family = NFPROTO_UNSPEC,
|
||||
.dimension = IPSET_DIM_ONE,
|
||||
.elem = {
|
||||
[IPSET_DIM_ONE] = {
|
||||
[IPSET_DIM_ONE - 1] = {
|
||||
.parse = ipset_parse_setname,
|
||||
.print = ipset_print_name,
|
||||
.opt = IPSET_OPT_NAME
|
||||
|
||||
Reference in New Issue
Block a user