Allow ipsets to be created with a default timeout of 0. This permits
timed entries to be added if required even though the default is 0
(indefinite)
Prior to this change a default timeout value of 0 would create a set without
timeout support.
Fixes: FS#3977
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
ipset->enabled = true;
ipset->family = FW3_FAMILY_V4;
ipset->reload_set = false;
+ ipset->timeout = -1; /* no timeout by default */
list_add_tail(&ipset->list, &state->ipsets);
ipset->portrange.port_min, ipset->portrange.port_max);
}
- if (ipset->timeout > 0)
+ if (ipset->timeout >= 0)
fw3_pr(" timeout %u", ipset->timeout);
if (ipset->maxelem > 0)