summaryrefslogtreecommitdiff
path: root/data/templates/firewall/nftables-offload.j2
diff options
context:
space:
mode:
authorNicolas Fort <nicolasfort1988@gmail.com>2023-11-21 17:36:20 +0000
committerNicolas Fort <nicolasfort1988@gmail.com>2023-11-21 17:36:20 +0000
commit4e8839b6d78c7629cd2c1daee0438472c96365a4 (patch)
tree1d70d79a5f3d1c2b31f962afdb7e908af5548d27 /data/templates/firewall/nftables-offload.j2
parent916adfaf0774df0731522bf3cbd886d794735c50 (diff)
downloadvyos-1x-4e8839b6d78c7629cd2c1daee0438472c96365a4.tar.gz
vyos-1x-4e8839b6d78c7629cd2c1daee0438472c96365a4.zip
T5419: firewall: backport firewall flowtable to Sagitta.
Diffstat (limited to 'data/templates/firewall/nftables-offload.j2')
-rw-r--r--data/templates/firewall/nftables-offload.j29
1 files changed, 9 insertions, 0 deletions
diff --git a/data/templates/firewall/nftables-offload.j2 b/data/templates/firewall/nftables-offload.j2
new file mode 100644
index 000000000..087fd141c
--- /dev/null
+++ b/data/templates/firewall/nftables-offload.j2
@@ -0,0 +1,9 @@
+{% macro flowtable(name, config) %}
+ flowtable VYOS_FLOWTABLE_{{ name }} {
+ hook ingress priority 0; devices = { {{ config.interface | join(', ') }} };
+{% if config.offload is vyos_defined('hardware') %}
+ flags offload;
+{% endif %}
+ counter
+ }
+{% endmacro %} \ No newline at end of file