HomeFreeBSD

pfctl: Fix crash on ALTQ configuration

Description

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)

Details

Provenance
kpAuthored on May 18 2021, 1:03 PM
Reviewer
pkelsey
Differential Revision
D30346: pfctl: Fix crash on ALTQ configuration
Parents
rG3c790f9e1d54: pf tests: Test the ability to kill floating states by interface
Branches
Unknown
Tags
Unknown