treewide: support set timeout
authorStijn Tintel <stijn@linux-ipv6.be>
Sat, 6 Nov 2021 01:21:33 +0000 (03:21 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Thu, 6 Jan 2022 12:49:11 +0000 (14:49 +0200)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Reviewed-by: Jo-Philipp Wich <jo@mein.io>
root/usr/share/firewall4/templates/ruleset.uc
root/usr/share/ucode/fw4.uc

index e392ada76429f7a2b2652d5963373d57d0037f9f..6b87a4910cd0493b13b3d48dad76e82f4d053dbc 100644 (file)
@@ -27,6 +27,9 @@ table inet fw4 {
 {%  if (set.maxelem > 0): %}
                size {{ set.maxelem }}
 {%  endif %}
+{%  if (set.timeout >= 0): %}
+               timeout {{ set.timeout }}s
+{% endif %}
 {%  if (set.interval): %}
                flags interval
 {%  endif %}
index 7d20871e41c0165c206aa7196b55d89c4d9c0e82..476982755b27d8e3a1740168b06596e41d3a3032 100644 (file)
@@ -2728,7 +2728,7 @@ return {
                        netmask: [ "int", null, UNSUPPORTED ],
                        maxelem: [ "int" ],
                        hashsize: [ "int", null, UNSUPPORTED ],
-                       timeout: [ "int", null, UNSUPPORTED ],
+                       timeout: [ "int", "-1" ],
 
                        external: [ "string", null, UNSUPPORTED ],