summaryrefslogtreecommitdiffstats
path: root/lib/ipset_hash_netport.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ipset_hash_netport.c')
-rw-r--r--lib/ipset_hash_netport.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/ipset_hash_netport.c b/lib/ipset_hash_netport.c
index d8d220e..285f06c 100644
--- a/lib/ipset_hash_netport.c
+++ b/lib/ipset_hash_netport.c
@@ -63,7 +63,7 @@ static const char hash_netport1_usage[] =
" Adding/deleting multiple elements with TCP/SCTP/UDP/UDPLITE\n"
" port range is supported both for IPv4 and IPv6.\n";
-struct ipset_type ipset_hash_netport1 = {
+static struct ipset_type ipset_hash_netport1 = {
.name = "hash:net,port",
.alias = { "netporthash", NULL },
.revision = 1,
@@ -137,7 +137,7 @@ static const char hash_netport2_usage[] =
" Adding/deleting multiple elements with TCP/SCTP/UDP/UDPLITE\n"
" port range is supported both for IPv4 and IPv6.\n";
-struct ipset_type ipset_hash_netport2 = {
+static struct ipset_type ipset_hash_netport2 = {
.name = "hash:net,port",
.alias = { "netporthash", NULL },
.revision = 2,
@@ -225,7 +225,7 @@ static const char hash_netport3_usage[] =
" Adding/deleting multiple elements with TCP/SCTP/UDP/UDPLITE\n"
" port range is supported both for IPv4 and IPv6.\n";
-struct ipset_type ipset_hash_netport3 = {
+static struct ipset_type ipset_hash_netport3 = {
.name = "hash:net,port",
.alias = { "netporthash", NULL },
.revision = 3,
@@ -286,3 +286,10 @@ struct ipset_type ipset_hash_netport3 = {
.usage = hash_netport3_usage,
.usagefn = ipset_port_usage,
};
+
+void _init(void)
+{
+ ipset_type_add(&ipset_hash_netport1);
+ ipset_type_add(&ipset_hash_netport2);
+ ipset_type_add(&ipset_hash_netport3);
+}