pf - state counter tracking like pfsync

Özkan KIRIK ozkan.kirik at gmail.com
Fri Jun 26 11:56:58 UTC 2020


Hi,

My goal is save pkt/byte counters of each expired/killed/closed states into
a txt file.
What is the right way to do this in userspace ?
Is it possible to do something with ioctl & poll ?

Alternatively is it possible to create multiple pfsync interfaces, first
one for real purpose to send state changes to slave host, the second one
for sending this log collect process lo1?

Following lines prevents cloning second pfsync interface:
/usr/src/sys/netpfil/pf/if_pfsync.c on line 331 (pfsync_clone_create
function)

  if (unit != 0)
    return (EINVAL);

If I remove these lines, do I hit any error ?

Best regards,
Thanks


More information about the freebsd-pf mailing list