[PATCH nft 1/3] tests/shell: add "bogons/nft-f/zero_length_devicename2_assert"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 .../testcases/bogons/nft-f/zero_length_devicename2_assert    | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 tests/shell/testcases/bogons/nft-f/zero_length_devicename2_assert

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
index 000000000000..fe416f8536e9
--- /dev/null
+++ b/tests/shell/testcases/bogons/nft-f/zero_length_devicename2_assert
@@ -0,0 +1,5 @@
+table netdev x {
+        chain Main_Ingress1 {
+                type filter hook ingress device "" priority -1
+	}
+}
-- 
2.41.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux