summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStijn Tintel2022-01-07 08:50:14 +0000
committerStijn Tintel2022-01-09 13:22:10 +0000
commitf121383b6d4dc038ac3cb634fcd897067fe0b7d7 (patch)
treea0af69703004593381a5e1d3c43d04072675269c
parent21f311d93a68b4c095c0162b4be20ce4b4c2540b (diff)
downloadfirewall4-f121383b6d4dc038ac3cb634fcd897067fe0b7d7.tar.gz
tests: enable flow offloading in tests
As flow offloading is a popular feature, it makes sense to cover it in the tests. This would have caught the issue fixed in b68cf6701945 ("main.uc: fix device gathering"). Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Reviewed-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--tests/01_configuration/01_ruleset11
-rw-r--r--tests/mocks/uci/firewall.json2
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/01_configuration/01_ruleset b/tests/01_configuration/01_ruleset
index 313b46a..b3e41fa 100644
--- a/tests/01_configuration/01_ruleset
+++ b/tests/01_configuration/01_ruleset
@@ -21,6 +21,16 @@ flush table inet fw4
table inet fw4 {
#
+ # Flowtable
+ #
+
+ flowtable ft {
+ hook ingress priority 0;
+ devices = { "br-lan", "wan" };
+ flags offload;
+ }
+
+ #
# Set definitions
#
@@ -59,6 +69,7 @@ table inet fw4 {
chain forward {
type filter hook forward priority filter; policy drop;
+ meta l4proto { tcp, udp } flow offload @ft;
ct state established,related accept comment "!fw4: Allow forwarded established and related flows"
iifname "br-lan" jump forward_lan comment "!fw4: Handle lan IPv4/IPv6 forward traffic"
iifname "wan" jump forward_wan comment "!fw4: Handle wan IPv4/IPv6 forward traffic"
diff --git a/tests/mocks/uci/firewall.json b/tests/mocks/uci/firewall.json
index 3a203b6..93afb69 100644
--- a/tests/mocks/uci/firewall.json
+++ b/tests/mocks/uci/firewall.json
@@ -1,5 +1,7 @@
{
"defaults": {
+ "flow_offloading": "1",
+ "flow_offloading_hw": "1",
"forward": "REJECT",
"input": "ACCEPT",
"output": "ACCEPT",