Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Oct 2005 13:57:25 +0100 (CET)
From:      Antoine Brodin <antoine.brodin@laposte.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/88271: [pf] [patch] pf.ko from buildkernel can't log in -current
Message-ID:  <200510311257.j9VCvOQc030633@barton.dreadbsd.org>
Resent-Message-ID: <200510311300.j9VD0TeM027773@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         88271
>Category:       kern
>Synopsis:       [pf] [patch] pf.ko from buildkernel can't log in -current
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 31 13:00:28 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Antoine Brodin
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
none
>Environment:
System: FreeBSD barton.dreadbsd.org 7.0-CURRENT FreeBSD 7.0-CURRENT #2: Mon Oct 31 10:38:59 CET 2005 antoine@barton.dreadbsd.org:/usr/obj/usr/src/sys/BARTON i386
>Description:
I already sent a description to freebsd-pf@ :
http://docs.freebsd.org/cgi/mid.cgi?20051030195002.5075e2fd.antoine.brodin
http://docs.freebsd.org/cgi/mid.cgi?20051031110115.72765f11.antoine.brodin

There's a problem with revision 1.8 of sys/modules/pf/Makefile :

pf says it logs packets :
%%%
# pfctl -sr -v | grep -A1 log
...
block return-rst log inet proto tcp all
  [ Evaluations: 847       Packets: 8         Bytes: 408         States: 0     ]
block return-icmp(port-unr) log inet proto udp all
  [ Evaluations: 847       Packets: 58        Bytes: 27811       States: 0     ]
...
%%%

but /var/log/pflog stays empty.

/usr/obj/usr/src/sys/BARTON/modules/usr/src/sys/modules/pf/opt_pf.h is a
symlink to /usr/obj/usr/src/sys/BARTON/opt_pf.h which is empty so that's
why I say it's related to revision 1.8 of sys/modules/pf/Makefile.
>How-To-Repeat:
Load pf.ko build during buildkernel, enable pf et pflog in rc.conf with
rules that log and watch /var/log/pflog.
>Fix:
The attached patch solves the problem :

--- pf.diff begins here ---
Index: sys/modules/pf/Makefile
===================================================================
RCS file: /home/ncvs/src/sys/modules/pf/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- sys/modules/pf/Makefile	14 Oct 2005 23:30:14 -0000	1.8
+++ sys/modules/pf/Makefile	31 Oct 2005 09:34:57 -0000
@@ -12,11 +12,11 @@
 
 CFLAGS+=  -I${.CURDIR}/../../contrib/pf
 
-.if !defined(KERNBUILDDIR)
 opt_pf.h:
 	echo "#define DEV_PF 1" > opt_pf.h
 	echo "#define DEV_PFLOG 1" >> opt_pf.h
 
+.if !defined(KERNBUILDDIR)
 opt_inet.h:
 	echo "#define INET 1" > opt_inet.h
 
--- pf.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510311257.j9VCvOQc030633>