]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pfctl: Fix crash on ALTQ configuration
authorKristof Provost <kp@FreeBSD.org>
Tue, 18 May 2021 13:03:01 +0000 (15:03 +0200)
committerKristof Provost <kp@FreeBSD.org>
Thu, 27 May 2021 07:09:55 +0000 (09:09 +0200)
commita4ceb1e192e66b1f38e712bb777014a977f8f3fe
tree86d81dea3a4b766f06d515511874d579625241fd
parent3c790f9e1d54ed57f09358216464ec80cab8f131
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

(cherry picked from commit 26705a39e51eaf5b32efa98fb86df2d4ecfbdc61)
sbin/pfctl/pfctl_altq.c