When pfilctl hooks is called with no hooks present:
% pfilctl hooks pfilctl: ioctl(PFILIOC_LISTHEADS): Bad address
If pio_nheads or pio_nhooks is not initialized, pfilioc_listheads()
thinks the caller wants the heads/hooks copied out. However, in this
case, the caller is only expecting the number of heads/hooks returned
and hasn't prepared the buffer that pfilioc_listheads() is trying to
copyout to, causing the bad address error.
Looking at pfilioc_listheads() in sys/net/pfil.c, should the semantics
be to return the number of heads/hooks when either pio_nheads or
pio_nhooks is zero?