pflogd is similar to spamlogd in that the interface
can be given in daemon_flags but the script assumes
it will always be pflog0.  man pages for pflog(4) and
pflogd(8) have examples using other interface names.

In -current spamlogd was updated to use getopts to
peak into daemon_flags to get the interface name.
This patch updates /etc/rc.d/pflogd to do the same.


diff -u pflogd pflogd
--- pflogd    Sun Oct 12 14:32:22 2025    1.3
+++ pflogd    Tue Dec 23 23:29:41 2025
@@ -9,10 +9,16 @@
 pexp="pflogd: \[priv\]"

 rc_pre() {
+       local _opt pflog=pflog0
+
+       while getopts :i: _opt $daemon_flags; do
+               [[ $_opt == i ]] && pflog=$OPTARG
+       done
+
        if pfctl -si | grep -q Enabled; then
-               ifconfig pflog0 create
-               if ifconfig pflog0; then
-                       ifconfig pflog0 up
+               ifconfig $pflog create
+               if ifconfig $pflog; then
+                       ifconfig $pflog up
                else
                        return 1
                fi

Reply via email to