Skip to contentSkip to conversation

tests: add test for dormant on/off/on bug

PATCH New Florian Westphal 1 participant 1 message Sep 15, 2023 netfilter

lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 tests: add test for dormant on/off/on bug

Disallow enabling/disabling a table in a single transaction. Make sure we still allow one update, either to dormant, or from active to dormant.

---
 .../transactions/dumps/table_onoff.nft        |  8 ++++
 .../shell/testcases/transactions/table_onoff  | 44 +++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 tests/shell/testcases/transactions/dumps/table_onoff.nft
 create mode 100755 tests/shell/testcases/transactions/table_onoff
tests/shell/testcases/transactions/dumps/table_onoff.nft new file +8 -0
new file mode 100644
index 000000000000..038be1c071ad
@@ -0,0 +1,8 @@
+table ip t {
+	flags dormant
+
+	chain c {
+		type filter hook input priority filter; policy accept;
+		ip daddr 127.0.0.42 counter packets 0 bytes 0
+	}
+}
tests/shell/testcases/transactions/table_onoff new file +44 -0

44 lines not on this page · raw message

Signature · 1 line
2.41.0