git: 47a3d57efdb8 - stable/13 - pfctl: Ensure parent queue is configured for FAIRQ

Kristof Provost kp at FreeBSD.org
Thu May 27 10:20:27 UTC 2021


The branch stable/13 has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=47a3d57efdb83b36985a5864af49c0261a2f40e8

commit 47a3d57efdb83b36985a5864af49c0261a2f40e8
Author:     Kristof Provost <kp at FreeBSD.org>
AuthorDate: 2021-05-18 16:22:13 +0000
Commit:     Kristof Provost <kp at FreeBSD.org>
CommitDate: 2021-05-27 07:03:42 +0000

    pfctl: Ensure parent queue is configured for FAIRQ
    
    We failed to account for the FAIRQ scheduler in expand_altq(), which led
    it to be set up without its parent queue.
    
    MFC after:      1 week
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D30347
    
    (cherry picked from commit dc784287967d45ab681dc51e9e20b78c8c535834)
---
 sbin/pfctl/parse.y | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 6acfefbf5ad3..4448a8255ce1 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -5107,7 +5107,8 @@ expand_altq(struct pf_altq *a, struct node_if *interfaces,
 			}
 
 			if (pa.scheduler == ALTQT_CBQ ||
-			    pa.scheduler == ALTQT_HFSC) {
+			    pa.scheduler == ALTQT_HFSC ||
+			    pa.scheduler == ALTQT_FAIRQ) {
 				/* now create a root queue */
 				memset(&pb, 0, sizeof(struct pf_altq));
 				if (strlcpy(qname, "root_", sizeof(qname)) >=
@@ -5138,7 +5139,8 @@ expand_altq(struct pf_altq *a, struct node_if *interfaces,
 				if (n == NULL)
 					err(1, "expand_altq: calloc");
 				if (pa.scheduler == ALTQT_CBQ ||
-				    pa.scheduler == ALTQT_HFSC)
+				    pa.scheduler == ALTQT_HFSC ||
+				    pa.scheduler == ALTQT_FAIRQ)
 					if (strlcpy(n->parent, qname,
 					    sizeof(n->parent)) >=
 					    sizeof(n->parent))


More information about the dev-commits-src-all mailing list