git: e5349a2909ab - main - pfctl tests: Ethernet rule parsing tests
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 02 Mar 2022 16:01:10 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=e5349a2909ab0d36a1e867501038fc37caf3d664
commit e5349a2909ab0d36a1e867501038fc37caf3d664
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2022-01-21 15:48:03 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2022-03-02 16:00:08 +0000
pfctl tests: Ethernet rule parsing tests
A few basic test cases for Ethernet rule parsing.
Sponsored by: Rubicon Communications, LLC ("Netgate")
---
sbin/pfctl/tests/files/pf1007.in | 1 +
sbin/pfctl/tests/files/pf1007.ok | 1 +
sbin/pfctl/tests/files/pf1008.in | 1 +
sbin/pfctl/tests/files/pf1008.ok | 1 +
sbin/pfctl/tests/files/pf1009.in | 1 +
sbin/pfctl/tests/files/pf1009.ok | 1 +
sbin/pfctl/tests/pfctl_test_list.inc | 3 +++
7 files changed, 9 insertions(+)
diff --git a/sbin/pfctl/tests/files/pf1007.in b/sbin/pfctl/tests/files/pf1007.in
new file mode 100644
index 000000000000..e08b38d7241a
--- /dev/null
+++ b/sbin/pfctl/tests/files/pf1007.in
@@ -0,0 +1 @@
+ether block out on igb0 to ! 00:01:02:03:04:05
diff --git a/sbin/pfctl/tests/files/pf1007.ok b/sbin/pfctl/tests/files/pf1007.ok
new file mode 100644
index 000000000000..e08b38d7241a
--- /dev/null
+++ b/sbin/pfctl/tests/files/pf1007.ok
@@ -0,0 +1 @@
+ether block out on igb0 to ! 00:01:02:03:04:05
diff --git a/sbin/pfctl/tests/files/pf1008.in b/sbin/pfctl/tests/files/pf1008.in
new file mode 100644
index 000000000000..a9bd472a5070
--- /dev/null
+++ b/sbin/pfctl/tests/files/pf1008.in
@@ -0,0 +1 @@
+ether block out on igb0 to 00:01:02:03:04:05/24
diff --git a/sbin/pfctl/tests/files/pf1008.ok b/sbin/pfctl/tests/files/pf1008.ok
new file mode 100644
index 000000000000..a9bd472a5070
--- /dev/null
+++ b/sbin/pfctl/tests/files/pf1008.ok
@@ -0,0 +1 @@
+ether block out on igb0 to 00:01:02:03:04:05/24
diff --git a/sbin/pfctl/tests/files/pf1009.in b/sbin/pfctl/tests/files/pf1009.in
new file mode 100644
index 000000000000..833c9099837c
--- /dev/null
+++ b/sbin/pfctl/tests/files/pf1009.in
@@ -0,0 +1 @@
+ether block out on igb0 to 00:01:02:03:04:05&ff:ff:ff:00:00:ff
diff --git a/sbin/pfctl/tests/files/pf1009.ok b/sbin/pfctl/tests/files/pf1009.ok
new file mode 100644
index 000000000000..833c9099837c
--- /dev/null
+++ b/sbin/pfctl/tests/files/pf1009.ok
@@ -0,0 +1 @@
+ether block out on igb0 to 00:01:02:03:04:05&ff:ff:ff:00:00:ff
diff --git a/sbin/pfctl/tests/pfctl_test_list.inc b/sbin/pfctl/tests/pfctl_test_list.inc
index 060a6019d05c..aa3f625e905f 100644
--- a/sbin/pfctl/tests/pfctl_test_list.inc
+++ b/sbin/pfctl/tests/pfctl_test_list.inc
@@ -117,3 +117,6 @@ PFCTL_TEST(1003, "ALTQ")
PFCTL_TEST(1004, "ALTQ with Codel")
PFCTL_TEST(1005, "PR 231323")
PFCTL_TEST(1006, "pfctl crashes with certain fairq configurations")
+PFCTL_TEST(1007, "Basic ethernet rule")
+PFCTL_TEST(1008, "Ethernet rule with mask length")
+PFCTL_TEST(1009, "Ethernet rule with mask")