aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2021-05-19 07:52:50 +0000
committerKristof Provost <kp@FreeBSD.org>2021-05-27 07:10:53 +0000
commit2f0a80794895a67c8b5882144c8b1e41c4fa8688 (patch)
tree1c57160fccab7977d4e0480b004c3a2955e4d370
parenta4ceb1e192e66b1f38e712bb777014a977f8f3fe (diff)
downloadsrc-2f0a80794895a67c8b5882144c8b1e41c4fa8688.tar.gz
src-2f0a80794895a67c8b5882144c8b1e41c4fa8688.zip
pfctl tests: Test fairq configuration
We used to have a bug where pfctl could crash setting fairq queues. Test this case and ensure it does not crash pfctl. Reviewed by: donner MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30348 (cherry picked from commit 9938fcaa6565a660c555a0e9c712842ba1a2d31c)
-rw-r--r--sbin/pfctl/tests/files/pf1006.in2
-rw-r--r--sbin/pfctl/tests/files/pf1006.ok2
-rw-r--r--sbin/pfctl/tests/pfctl_test_list.inc1
3 files changed, 5 insertions, 0 deletions
diff --git a/sbin/pfctl/tests/files/pf1006.in b/sbin/pfctl/tests/files/pf1006.in
new file mode 100644
index 000000000000..b50c16994cfc
--- /dev/null
+++ b/sbin/pfctl/tests/files/pf1006.in
@@ -0,0 +1,2 @@
+altq on igb0 fairq bandwidth 1Gb queue { qLink }
+queue qLink fairq(default)
diff --git a/sbin/pfctl/tests/files/pf1006.ok b/sbin/pfctl/tests/files/pf1006.ok
new file mode 100644
index 000000000000..be44b765c2e9
--- /dev/null
+++ b/sbin/pfctl/tests/files/pf1006.ok
@@ -0,0 +1,2 @@
+altq on igb0 fairq bandwidth 1Gb tbrsize 36000 queue { qLink }
+queue qLink fairq( default )
diff --git a/sbin/pfctl/tests/pfctl_test_list.inc b/sbin/pfctl/tests/pfctl_test_list.inc
index 337dff640f42..060a6019d05c 100644
--- a/sbin/pfctl/tests/pfctl_test_list.inc
+++ b/sbin/pfctl/tests/pfctl_test_list.inc
@@ -116,3 +116,4 @@ PFCTL_TEST(1002, "Set timeout interval")
PFCTL_TEST(1003, "ALTQ")
PFCTL_TEST(1004, "ALTQ with Codel")
PFCTL_TEST(1005, "PR 231323")
+PFCTL_TEST(1006, "pfctl crashes with certain fairq configurations")