Discussion:
fqcodel panic - pfctl
Sebastien Marie
2017-05-20 16:03:11 UTC
Permalink
Hi,

Here a report for a second panic regarding fqcodel.

The panic occurs at pfctl time: KASSERT(qs->parent_qid == 0) from
fqcodel_pf_addqueue is reached.

I suspect a fqcodel queue not to be usable as parent of another queue.
but pfctl parser doesn't forbid it, and kernel panic occurs.


$ cat pf.conf
# See pf.conf(5) and /etc/examples/pf.conf

set skip on lo

block return # block stateless traffic
pass # establish keep-state

# By default, do not permit remote connections to X11
block return in on ! lo0 proto tcp to port 6000:6010

# By default, no network access for build users
block return out proto { tcp udp } user { build _pbuild }

queue fq on bce0 flows 1024
queue test parent fq bandwidth 10M default

$ doas pfctl -n -f pf.conf
$ doas pfctl -f pf.conf
<panic here>
--
Sebastien Marie
Mike Belopuhov
2017-05-24 16:38:40 UTC
Permalink
Post by Sebastien Marie
Hi,
Here a report for a second panic regarding fqcodel.
The panic occurs at pfctl time: KASSERT(qs->parent_qid == 0) from
fqcodel_pf_addqueue is reached.
I suspect a fqcodel queue not to be usable as parent of another queue.
Indeed, it is not. I think I've lost the check in pfctl during
late refactoring.
Post by Sebastien Marie
but pfctl parser doesn't forbid it, and kernel panic occurs.
I've changed the KASSERT to returning EINVAL, but I'm not going to
touch pfctl parser just yet. I'll be working in this area this
Post by Sebastien Marie
queue test parent fq bandwidth 10M default
Loading...