From owner-freebsd-pf@FreeBSD.ORG Fri Nov 4 14:11:21 2005 Return-Path: X-Original-To: freebsd-pf@freebsd.org Delivered-To: freebsd-pf@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09F6B16A41F for ; Fri, 4 Nov 2005 14:11:21 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id D597343D45 for ; Fri, 4 Nov 2005 14:11:16 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id jA4EBA1L050320; Fri, 4 Nov 2005 17:11:10 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id jA4EB77D050319; Fri, 4 Nov 2005 17:11:07 +0300 (MSK) (envelope-from yar) Date: Fri, 4 Nov 2005 17:11:07 +0300 From: Yar Tikhiy To: Antoine Brodin Message-ID: <20051104141106.GA38897@comp.chem.msu.su> References: <20051030195002.5075e2fd.antoine.brodin@laposte.net> <20051031110115.72765f11.antoine.brodin@laposte.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051031110115.72765f11.antoine.brodin@laposte.net> User-Agent: Mutt/1.5.9i Cc: freebsd-pf@freebsd.org Subject: Re: pf used as a module from buildkernel can't log in -current ? X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 14:11:21 -0000 On Mon, Oct 31, 2005 at 11:01:15AM +0100, Antoine Brodin wrote: > I wrote: > > Hi, > > > > I use pf as a module on -current and it worked well until recently. > > Today I noticed that pflogd didn't log anything. It worked correctly > > a month ago. > > > > This seems to be related to 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 > > > > opt_pf.h is empty too (that's why I say it's probably related to > > revision 1.8 of sys/modules/pf/Makefile) : > > > > %%% > > % file /usr/obj/usr/src/sys/BARTON/opt_pf.h > > /usr/obj/usr/src/sys/BARTON/opt_pf.h: empty > > %%% > > > > If I rebuild pf.ko in /sys/modules/pf , unload the other one and reload > > this one pflogd does his job. > > > > Is this behaviour expected ? > > The attached patch solves this problem > > Cheers, > > > Antoine > 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 > This patch just masks the real problem. As I've told here already, the problem is having a single module for 2 devices, pf and pflog. -- Yar