1 From 9c221f305f107f3d50a661b8da2f32f3140d1224 Mon Sep 17 00:00:00 2001
2 From: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
3 Date: Sat, 14 Aug 2021 06:54:13 +0100
4 Subject: [PATCH 2/2] ipsets: permit default timeout of 0
6 Allow ipsets to be created with timeout facility but with a default
7 timeout of 0. This permits timed entries to be added if required even
8 though the default is 0 (indefinite)
10 Previously a default timeout value of 0 would create a set without
15 Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
18 1 file changed, 2 insertions(+), 1 deletion(-)
20 diff --git a/ipsets.c b/ipsets.c
21 index ba31e64..e7cde16 100644
24 @@ -266,6 +266,7 @@ fw3_alloc_ipset(struct fw3_state *state)
25 ipset->enabled = true;
26 ipset->family = FW3_FAMILY_V4;
27 ipset->reload_set = false;
28 + ipset->timeout = -1; /* no timeout by default */
30 list_add_tail(&ipset->list, &state->ipsets);
32 @@ -395,7 +396,7 @@ create_ipset(struct fw3_ipset *ipset, struct fw3_state *state)
33 ipset->portrange.port_min, ipset->portrange.port_max);
36 - if (ipset->timeout > 0)
37 + if (ipset->timeout >= 0)
38 fw3_pr(" timeout %u", ipset->timeout);
40 if (ipset->maxelem > 0)
42 2.30.1 (Apple Git-130)