Commit 5f823fdd authored by Sigmund Augdal's avatar Sigmund Augdal

ipset size is limited by both maxelem and hashsize. We did only set maxelem

parent a1b2ca79
......@@ -21,7 +21,7 @@ RULES_FROM_CIDR = "rls_from_cidr"
RULES_FROM_CIDR_TO_IP = "rls_cidr_to_ip"
RULES_BY_SRC = "rls_by_src"
RULES_BY_SRC_TO_IP = "rls_by_src_to_ip"
MAXELEM = 16777216
MAXELEM = 0x100000
def call(cmd, stdin):
......@@ -88,8 +88,9 @@ class Generator(object):
for family in ("inet", "inet6"):
setname = self.set_name(name, family)
self.group_members[setname] = 0
self.output("create {} {} family {} maxelem {}".format(setname, set_type, family,
MAXELEM))
self.output("create {} {} family {} hashsize {} maxelem {}".format(setname, set_type,
family,
MAXELEM, MAXELEM))
return name
def add_ipset_net(self, name, net):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment