From 9938fcaa6565a660c555a0e9c712842ba1a2d31c Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Wed, 19 May 2021 09:52:50 +0200 Subject: [PATCH] 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 --- sbin/pfctl/tests/files/pf1006.in | 2 ++ sbin/pfctl/tests/files/pf1006.ok | 2 ++ sbin/pfctl/tests/pfctl_test_list.inc | 1 + 3 files changed, 5 insertions(+) create mode 100644 sbin/pfctl/tests/files/pf1006.in create mode 100644 sbin/pfctl/tests/files/pf1006.ok 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")