]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests/shell: add "bogons/nft-f/zero_length_devicename2_assert"
authorThomas Haller <thaller@redhat.com>
Mon, 23 Oct 2023 17:00:45 +0000 (19:00 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 24 Oct 2023 09:31:02 +0000 (11:31 +0200)
This is copied from "bogons/nft-f/zero_length_devicename_assert" and
adjusted.

- `device""lo"` looks odd. In this file use `device ""` to only check
  against empty strings, without oddity.

- "ip" type has no hook ingress in filter. If the device name would be
  valid, the file would still be rejected. Use "netdev".

The purpose is to add a test for a file that would otherwise pass,
except having an empty device name. Without oddities.

Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/shell/testcases/bogons/nft-f/zero_length_devicename2_assert [new file with mode: 0644]

diff --git a/tests/shell/testcases/bogons/nft-f/zero_length_devicename2_assert b/tests/shell/testcases/bogons/nft-f/zero_length_devicename2_assert
new file mode 100644 (file)
index 0000000..fe416f8
--- /dev/null
@@ -0,0 +1,5 @@
+table netdev x {
+        chain Main_Ingress1 {
+                type filter hook ingress device "" priority -1
+       }
+}