summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStijn Tintel2021-11-06 01:21:33 +0000
committerStijn Tintel2022-01-06 12:49:11 +0000
commit38889b77cc6f59eefd640b19f33e55efb53965aa (patch)
tree99636366ec80e8f6c6a6e86a4027cd4494b6c024
parentbe3b4e6717257c6b439f72127526072eacc6b514 (diff)
downloadfirewall4-38889b77cc6f59eefd640b19f33e55efb53965aa.tar.gz
treewide: support set timeout
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Reviewed-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--root/usr/share/firewall4/templates/ruleset.uc3
-rw-r--r--root/usr/share/ucode/fw4.uc2
2 files changed, 4 insertions, 1 deletions
diff --git a/root/usr/share/firewall4/templates/ruleset.uc b/root/usr/share/firewall4/templates/ruleset.uc
index e392ada..6b87a49 100644
--- a/root/usr/share/firewall4/templates/ruleset.uc
+++ b/root/usr/share/firewall4/templates/ruleset.uc
@@ -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 %}
diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc
index 7d20871..4769827 100644
--- a/root/usr/share/ucode/fw4.uc
+++ b/root/usr/share/ucode/fw4.uc
@@ -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 ],