aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2022-01-21 15:48:03 +0000
committerKristof Provost <kp@FreeBSD.org>2022-03-02 16:00:08 +0000
commite5349a2909ab0d36a1e867501038fc37caf3d664 (patch)
tree32cff9f925aa8e3c23cd1dc9662bd326d62b14d9
parentc32cd18055c01f2460950351accfe79f87a24c43 (diff)
downloadsrc-e5349a2909ab0d36a1e867501038fc37caf3d664.tar.gz
src-e5349a2909ab0d36a1e867501038fc37caf3d664.zip
pfctl tests: Ethernet rule parsing tests
A few basic test cases for Ethernet rule parsing. Sponsored by: Rubicon Communications, LLC ("Netgate")
-rw-r--r--sbin/pfctl/tests/files/pf1007.in1
-rw-r--r--sbin/pfctl/tests/files/pf1007.ok1
-rw-r--r--sbin/pfctl/tests/files/pf1008.in1
-rw-r--r--sbin/pfctl/tests/files/pf1008.ok1
-rw-r--r--sbin/pfctl/tests/files/pf1009.in1
-rw-r--r--sbin/pfctl/tests/files/pf1009.ok1
-rw-r--r--sbin/pfctl/tests/pfctl_test_list.inc3
7 files changed, 9 insertions, 0 deletions
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")