From c5bc18c83645ceeb4cd8470ce4c5d2165207b9f4 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Tue, 18 May 2021 18:22:13 +0200 Subject: [PATCH] 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 903bbd47d66..06d97255619 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -5099,7 +5099,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)) >= @@ -5130,7 +5131,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)) -- 2.45.0