Since pflog interface creation was moved to rc.d/pflogd, you can
no longer run spamlogd without also running pflogd. This diff copies
the interface creation code from pflogd (it doesn't hurt to create
pflog0 twice).

This doesn't handle the case with spamlogd -l where a non-default
interface is used (but neither does pflogd handle the case with -i),
but I think for non-default options it's reasonable to expect the
user to do a little more work (e.g. 'echo up > /etc/hostname.pflog1').

Index: spamlogd
===================================================================
RCS file: /cvs/src/etc/rc.d/spamlogd,v
retrieving revision 1.1
diff -u -p -r1.1 spamlogd
--- spamlogd    8 Jul 2011 02:15:34 -0000       1.1
+++ spamlogd    6 Aug 2011 11:32:39 -0000
@@ -10,6 +10,17 @@ rc_reload=NO
 
 rc_pre() {
        [  X"${spamd_flags}" != X"NO" -a X"${spamd_black}" = X"NO" ]
+
+       if pfctl -si | grep -q Enabled; then
+               ifconfig pflog0 create
+               if ifconfig pflog0; then
+                       ifconfig pflog0 up
+               else
+                       return 1
+               fi
+       else
+               return 1
+       fi
 }
 
 rc_cmd $1

Reply via email to