aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2021-05-18 13:03:01 +0000
committerKristof Provost <kp@FreeBSD.org>2021-05-20 12:06:22 +0000
commit26705a39e51eaf5b32efa98fb86df2d4ecfbdc61 (patch)
treee9833f1270d43509d286e6c11e98a719f8b25ac9 /sbin
parent7bd7933f9a4f1757fdefeee2e1ac8b8c4d299fc3 (diff)
downloadsrc-26705a39e51eaf5b32efa98fb86df2d4ecfbdc61.tar.gz
src-26705a39e51eaf5b32efa98fb86df2d4ecfbdc61.zip
pfctl: Fix crash on ALTQ configuration
The following config could crash pfctl: altq on igb0 fairq bandwidth 1Gb queue { qLink } queue qLink fairq(default) That happens because when we're parsing the parent queue (on igb0) it doesn't have a parent, and the check in eval_pfqueue_fairq() checks pa->parent rather than parent. This was changed in eval_pfqueue_hfsc() in 1d34c9dac8624c5c315ae39ad3ae8e5879b23256, but not for fairq. Reviewed by: pkelsey MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30346
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pfctl/pfctl_altq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/pfctl/pfctl_altq.c b/sbin/pfctl/pfctl_altq.c
index 6541c031c75e..304bf69d7c7a 100644
--- a/sbin/pfctl/pfctl_altq.c
+++ b/sbin/pfctl/pfctl_altq.c
@@ -864,7 +864,7 @@ eval_pfqueue_fairq(struct pfctl *pf __unused, struct pf_altq *pa,
opts = &pa->pq_u.fairq_opts;
- if (pa->parent == NULL) {
+ if (parent == NULL) {
/* root queue */
opts->lssc_m1 = pa->ifbandwidth;
opts->lssc_m2 = pa->ifbandwidth;