From owner-freebsd-pf@FreeBSD.ORG Sun Oct 3 13:53:40 2004 Return-Path: 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 E172916A4DA for ; Sun, 3 Oct 2004 13:53:40 +0000 (GMT) Received: from mail.freebsd.org.cn (dns3.freebsd.org.cn [61.129.66.75]) by mx1.FreeBSD.org (Postfix) with SMTP id 459ED43D48 for ; Sun, 3 Oct 2004 13:53:32 +0000 (GMT) (envelope-from delphij@frontfree.net) Received: (qmail 55911 invoked by uid 0); 3 Oct 2004 13:49:15 -0000 Received: from unknown (HELO beastie.frontfree.net) (219.239.98.7) by mail.freebsd.org.cn with SMTP; 3 Oct 2004 13:49:15 -0000 Received: from localhost (localhost.frontfree.net [127.0.0.1]) by beastie.frontfree.net (Postfix) with ESMTP id C6F2B13190F; Sun, 3 Oct 2004 21:53:24 +0800 (CST) Received: from beastie.frontfree.net ([127.0.0.1]) by localhost (beastie.frontfree.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00200-03; Sun, 3 Oct 2004 21:53:19 +0800 (CST) Received: by beastie.frontfree.net (Postfix, from userid 1001) id 283C3130EC4; Sun, 3 Oct 2004 21:53:19 +0800 (CST) Date: Sun, 3 Oct 2004 21:53:19 +0800 From: Xin LI To: freebsd-ports@FreeBSD.org, freebsd-pf@FreeBSD.org Message-ID: <20041003135319.GA298@frontfree.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-GPG-key-ID/Fingerprint: 0xCAEEB8C0 / 43B8 B703 B8DD 0231 B333 DC28 39FB 93A0 CAEE B8C0 X-GPG-Public-Key: http://www.delphij.net/delphij.asc X-Operating-System: FreeBSD beastie.frontfree.net 5.3-delphij FreeBSD 5.3-delphij #4: Mon Sep 13 12:44:05 CST 2004 delphij@beastie.frontfree.net:/usr/obj/usr/src/sys/BEASTIE i386 X-URL: http://www.delphij.net X-By: delphij@beastie.frontfree.net X-Location: Beijing, China X-Virus-Scanned: by amavisd-new at frontfree.net Subject: [CALL FOR TEST] pf/spamd 3.6 X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.1 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: Sun, 03 Oct 2004 13:53:41 -0000 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [This is cc'ed to both ports@ and pf@] Hi, All If you are interested in OpenBSD's pf/spamd, then I would request you to try out the updated version before I would actually submit it. I have adopted it with latest OPENBSD_3_6 version. (The final version may change one or two files in this version of tarball). The patch is available here: http://people.freebsd.org/~delphij/patch-spamd You can apply it to your ports tree, under mail/spamd. Among other changes, the startup script name has been changed to 'pf-spamd.= sh' so it won't conflicit with SpamAssassin's spamd.sh. The configuration of present pf/spamd installation should not require any changes to make it work. Please let me know if you went into problem, and I'd appreciate any reports, especially those with backtraces and/or patches ;-) Cheers, --=20 Xin LI http://www.delphij.net/ See complete headers for GPG key and other information. --GvXjxJ+pjyke8COw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBYARP/cVsHxFZiIoRAvj3AJwP1L9oc92UK3BbcdxP7qgT29SUhgCeNdn6 KKu9dHVpH5t/i7M6jl0Q1+Y= =csE9 -----END PGP SIGNATURE----- --GvXjxJ+pjyke8COw-- From owner-freebsd-pf@FreeBSD.ORG Mon Oct 4 07:45:57 2004 Return-Path: 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 C835216A4CF for ; Mon, 4 Oct 2004 07:45:57 +0000 (GMT) Received: from ns.kt-is.co.kr (ns.kt-is.co.kr [211.218.149.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E8D643D45 for ; Mon, 4 Oct 2004 07:45:57 +0000 (GMT) (envelope-from yongari@kt-is.co.kr) Received: from michelle.kt-is.co.kr (ns2.kt-is.co.kr [220.76.118.193]) (authenticated bits=128) by ns.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id i947inAh047953 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 4 Oct 2004 16:44:49 +0900 (KST) Received: from michelle.kt-is.co.kr (localhost.kt-is.co.kr [127.0.0.1]) by michelle.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id i947jrAL001649 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 4 Oct 2004 16:45:53 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Received: (from yongari@localhost) by michelle.kt-is.co.kr (8.12.10/8.12.10/Submit) id i947jrtH001648 for freebsd-pf@freebsd.org; Mon, 4 Oct 2004 16:45:53 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Date: Mon, 4 Oct 2004 16:45:53 +0900 From: Pyun YongHyeon To: freebsd-pf@freebsd.org Message-ID: <20041004074553.GB1226@kt-is.co.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Filter-Version: 1.11a (ns.kt-is.co.kr) Subject: Shutting down pflogd gracefully X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: yongari@kt-is.co.kr 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: Mon, 04 Oct 2004 07:45:57 -0000 Hi, When pf module is unloaded prior to termination of pflogd(8), pflogd(8) takes up all available CPU cycles. This patch tries to address the long standing issue. Comments? --- contrib/pf/pflogd/pflogd.c.orig Wed Sep 1 03:04:34 2004 +++ contrib/pf/pflogd/pflogd.c Mon Oct 4 16:18:51 2004 @@ -656,8 +656,13 @@ while (1) { np = pcap_dispatch(hpcap, PCAP_NUM_PKTS, dump_packet, (u_char *)dpcap); - if (np < 0) + if (np < 0) { logmsg(LOG_NOTICE, "%s", pcap_geterr(hpcap)); +#ifdef __FreeBSD__ + /* check errno == ENXIO? */ + break; +#endif + } if (gotsig_close) break; While fixing the issue, I noticed log messages via syslog is not gernerated. But in debugging mode(-D) outputting to stderr worked ok.(Killing pflogd with kill doesn't generate "Exiting" message.) Any ideas? Regards, Pyun YongHyeon -- Pyun YongHyeon From owner-freebsd-pf@FreeBSD.ORG Mon Oct 4 09:05:35 2004 Return-Path: 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 94DAD16A4CE for ; Mon, 4 Oct 2004 09:05:35 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 057B443D3F for ; Mon, 4 Oct 2004 09:05:35 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.206] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CEOmi-0002hp-00; Mon, 04 Oct 2004 11:05:32 +0200 Received: from [217.83.8.81] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CEOmi-00072i-00; Mon, 04 Oct 2004 11:05:32 +0200 From: Max Laier To: freebsd-pf@freebsd.org, yongari@kt-is.co.kr Date: Mon, 4 Oct 2004 11:04:44 +0200 User-Agent: KMail/1.7 References: <20041004074553.GB1226@kt-is.co.kr> In-Reply-To: <20041004074553.GB1226@kt-is.co.kr> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6172252.dlTux70jhI"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200410041104.51591.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 Subject: Re: Shutting down pflogd gracefully X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.1 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: Mon, 04 Oct 2004 09:05:35 -0000 --nextPart6172252.dlTux70jhI Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 04 October 2004 09:45, Pyun YongHyeon wrote: > Hi, > > When pf module is unloaded prior to termination of pflogd(8), > pflogd(8) takes up all available CPU cycles. This patch tries > to address the long standing issue. Comments? Yeah ... go for it, please. Make sure to MT5 it as well. > --- contrib/pf/pflogd/pflogd.c.orig Wed Sep 1 03:04:34 2004 > +++ contrib/pf/pflogd/pflogd.c Mon Oct 4 16:18:51 2004 > @@ -656,8 +656,13 @@ > while (1) { > np =3D pcap_dispatch(hpcap, PCAP_NUM_PKTS, > dump_packet, (u_char *)dpcap); > - if (np < 0) > + if (np < 0) { > logmsg(LOG_NOTICE, "%s", pcap_geterr(hpcap)); > +#ifdef __FreeBSD__ > + /* check errno =3D=3D ENXIO? */ > + break; Anything we should clean up here, or is appropriate cleanup code below the= =20 daemon-loop? > +#endif > + } > > if (gotsig_close) > break; > > While fixing the issue, I noticed log messages via syslog is not > gernerated. But in debugging mode(-D) outputting to stderr worked > ok.(Killing pflogd with kill doesn't generate "Exiting" message.) > Any ideas? We don't have a "daemon.*" facility in the FreeBSD syslog.conf by default. = It=20 seems to be consensus (for some reason) to not add it by default. At least = a=20 commit doing this has been backed out again (7 years ago). If you want the= =20 pflogd(8) messages stored, you have to add something like: daemon.* /var/log/daemon to your /etc/syslog.conf ... not sure if there is a better way at this poin= t. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart6172252.dlTux70jhI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBYRIzXyyEoT62BG0RAufhAJ9UOyG9HZeyihhEezwCdZRoYwmNswCfT9z3 pDAulNrRyYKiUdG9eFcPX9U= =qjaG -----END PGP SIGNATURE----- --nextPart6172252.dlTux70jhI-- From owner-freebsd-pf@FreeBSD.ORG Mon Oct 4 09:28:10 2004 Return-Path: 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 72D9A16A4CE for ; Mon, 4 Oct 2004 09:28:10 +0000 (GMT) Received: from ns.kt-is.co.kr (ns.kt-is.co.kr [211.218.149.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id D064843D45 for ; Mon, 4 Oct 2004 09:28:09 +0000 (GMT) (envelope-from yongari@kt-is.co.kr) Received: from michelle.kt-is.co.kr (ns2.kt-is.co.kr [220.76.118.193]) (authenticated bits=128) by ns.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id i949R0Ah053994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 4 Oct 2004 18:27:00 +0900 (KST) Received: from michelle.kt-is.co.kr (localhost.kt-is.co.kr [127.0.0.1]) by michelle.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id i949S4AL001948 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Oct 2004 18:28:04 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Received: (from yongari@localhost) by michelle.kt-is.co.kr (8.12.10/8.12.10/Submit) id i949S3Hn001947; Mon, 4 Oct 2004 18:28:03 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Date: Mon, 4 Oct 2004 18:28:03 +0900 From: Pyun YongHyeon To: Max Laier Message-ID: <20041004092803.GA1674@kt-is.co.kr> References: <20041004074553.GB1226@kt-is.co.kr> <200410041104.51591.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410041104.51591.max@love2party.net> User-Agent: Mutt/1.4.1i X-Filter-Version: 1.11a (ns.kt-is.co.kr) cc: freebsd-pf@freebsd.org Subject: Re: Shutting down pflogd gracefully X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: yongari@kt-is.co.kr 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: Mon, 04 Oct 2004 09:28:10 -0000 On Mon, Oct 04, 2004 at 11:04:44AM +0200, Max Laier wrote: > On Monday 04 October 2004 09:45, Pyun YongHyeon wrote: > > Hi, > > > > When pf module is unloaded prior to termination of pflogd(8), > > pflogd(8) takes up all available CPU cycles. This patch tries > > to address the long standing issue. Comments? > > Yeah ... go for it, please. Make sure to MT5 it as well. > yes, I'd like to but my local cvs server has some problems in it.(disk I/O error) I guess I can't commit it until new disk is available.(may be next week or end of this week) I'd like to avoid direct checkout with the official repository as it is recommended by committer's guide. > > --- contrib/pf/pflogd/pflogd.c.orig Wed Sep 1 03:04:34 2004 > > +++ contrib/pf/pflogd/pflogd.c Mon Oct 4 16:18:51 2004 > > @@ -656,8 +656,13 @@ > > while (1) { > > np = pcap_dispatch(hpcap, PCAP_NUM_PKTS, > > dump_packet, (u_char *)dpcap); > > - if (np < 0) > > + if (np < 0) { > > logmsg(LOG_NOTICE, "%s", pcap_geterr(hpcap)); > > +#ifdef __FreeBSD__ > > + /* check errno == ENXIO? */ > > + break; > > Anything we should clean up here, or is appropriate cleanup code below the > daemon-loop? > Hmm, I can't sure. I can't think any other error code except ENXIO when pflog device was destroyed. And normal cleanup code seems to be ok. > > +#endif > > + } > > > > if (gotsig_close) > > break; > > > > While fixing the issue, I noticed log messages via syslog is not > > gernerated. But in debugging mode(-D) outputting to stderr worked > > ok.(Killing pflogd with kill doesn't generate "Exiting" message.) > > Any ideas? > > We don't have a "daemon.*" facility in the FreeBSD syslog.conf by default. It > seems to be consensus (for some reason) to not add it by default. At least a > commit doing this has been backed out again (7 years ago). If you want the > pflogd(8) messages stored, you have to add something like: > > daemon.* /var/log/daemon > > to your /etc/syslog.conf ... not sure if there is a better way at this point. > So I had to add the following lines in syslog.conf. !pflogd *.* /var/log/pflogd.log As I said this doesn't generate any log when pflog exits. Thanks. -- Pyun YongHyeon From owner-freebsd-pf@FreeBSD.ORG Tue Oct 5 08:31:32 2004 Return-Path: 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 C9C5B16A4CE for ; Tue, 5 Oct 2004 08:31:32 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6480C43D2F for ; Tue, 5 Oct 2004 08:31:32 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CEkjK-0001P1-00; Tue, 05 Oct 2004 10:31:30 +0200 Received: from [217.83.10.25] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CEkjJ-0005ru-00; Tue, 05 Oct 2004 10:31:30 +0200 From: Max Laier To: freebsd-pf@freebsd.org, yongari@kt-is.co.kr Date: Tue, 5 Oct 2004 10:30:44 +0200 User-Agent: KMail/1.7 References: <20041004074553.GB1226@kt-is.co.kr> In-Reply-To: <20041004074553.GB1226@kt-is.co.kr> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2167821.LtlcxhUaUS"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200410051030.51799.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 Subject: Re: Shutting down pflogd gracefully X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.1 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: Tue, 05 Oct 2004 08:31:32 -0000 --nextPart2167821.LtlcxhUaUS Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 04 October 2004 09:45, Pyun YongHyeon wrote: > Hi, > > When pf module is unloaded prior to termination of pflogd(8), > pflogd(8) takes up all available CPU cycles. This patch tries > to address the long standing issue. Comments? > > --- contrib/pf/pflogd/pflogd.c.orig Wed Sep 1 03:04:34 2004 > +++ contrib/pf/pflogd/pflogd.c Mon Oct 4 16:18:51 2004 > @@ -656,8 +656,13 @@ > while (1) { > np =3D pcap_dispatch(hpcap, PCAP_NUM_PKTS, > dump_packet, (u_char *)dpcap); > - if (np < 0) > + if (np < 0) { > logmsg(LOG_NOTICE, "%s", pcap_geterr(hpcap)); > +#ifdef __FreeBSD__ > + /* check errno =3D=3D ENXIO? */ > + break; > +#endif > + } > > if (gotsig_close) > break; Committed with a minor change, such that I reordered the logmsg and the err= no=20 check in order to avoid errno overrides. Thanks. > While fixing the issue, I noticed log messages via syslog is not > gernerated. But in debugging mode(-D) outputting to stderr worked > ok.(Killing pflogd with kill doesn't generate "Exiting" message.) > Any ideas? It seems to be related to the priv. separation, as I get the: "pflogd[367]: [priv]: msg PRIV_OPEN_LOG received" messages, but nothing from the forked child (the working thread). =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart2167821.LtlcxhUaUS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBYlu7XyyEoT62BG0RAtxlAJ9frrY49pHV4kJ6mULwBGSgZTBuQQCfQIvl LXKmoUe9K8aMphRUw1BjMEI= =MGnD -----END PGP SIGNATURE----- --nextPart2167821.LtlcxhUaUS-- From owner-freebsd-pf@FreeBSD.ORG Tue Oct 5 10:05:51 2004 Return-Path: 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 0A03216A4CE for ; Tue, 5 Oct 2004 10:05:51 +0000 (GMT) Received: from ns.kt-is.co.kr (ns.kt-is.co.kr [211.218.149.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 627D143D45 for ; Tue, 5 Oct 2004 10:05:50 +0000 (GMT) (envelope-from yongari@kt-is.co.kr) Received: from michelle.kt-is.co.kr (ns2.kt-is.co.kr [220.76.118.193]) (authenticated bits=128) by ns.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id i95A4OAh010959 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 5 Oct 2004 19:04:24 +0900 (KST) Received: from michelle.kt-is.co.kr (localhost.kt-is.co.kr [127.0.0.1]) by michelle.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id i95A5aAL005613 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 Oct 2004 19:05:36 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Received: (from yongari@localhost) by michelle.kt-is.co.kr (8.12.10/8.12.10/Submit) id i95A5YH9005612; Tue, 5 Oct 2004 19:05:34 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Date: Tue, 5 Oct 2004 19:05:34 +0900 From: Pyun YongHyeon To: Max Laier Message-ID: <20041005100534.GA5134@kt-is.co.kr> References: <20041004074553.GB1226@kt-is.co.kr> <200410051030.51799.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410051030.51799.max@love2party.net> User-Agent: Mutt/1.4.1i X-Filter-Version: 1.11a (ns.kt-is.co.kr) cc: freebsd-pf@freebsd.org Subject: Re: Shutting down pflogd gracefully X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: yongari@kt-is.co.kr 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: Tue, 05 Oct 2004 10:05:51 -0000 On Tue, Oct 05, 2004 at 10:30:44AM +0200, Max Laier wrote: > On Monday 04 October 2004 09:45, Pyun YongHyeon wrote: > > Hi, > > > > When pf module is unloaded prior to termination of pflogd(8), > > pflogd(8) takes up all available CPU cycles. This patch tries > > to address the long standing issue. Comments? > > > > --- contrib/pf/pflogd/pflogd.c.orig Wed Sep 1 03:04:34 2004 > > +++ contrib/pf/pflogd/pflogd.c Mon Oct 4 16:18:51 2004 > > @@ -656,8 +656,13 @@ > > while (1) { > > np = pcap_dispatch(hpcap, PCAP_NUM_PKTS, > > dump_packet, (u_char *)dpcap); > > - if (np < 0) > > + if (np < 0) { > > logmsg(LOG_NOTICE, "%s", pcap_geterr(hpcap)); > > +#ifdef __FreeBSD__ > > + /* check errno == ENXIO? */ > > + break; > > +#endif > > + } > > > > if (gotsig_close) > > break; > > Committed with a minor change, such that I reordered the logmsg and the errno > check in order to avoid errno overrides. Thanks. > Thanks a lot. :-) > > While fixing the issue, I noticed log messages via syslog is not > > gernerated. But in debugging mode(-D) outputting to stderr worked > > ok.(Killing pflogd with kill doesn't generate "Exiting" message.) > > Any ideas? > > It seems to be related to the priv. separation, as I get the: > "pflogd[367]: [priv]: msg PRIV_OPEN_LOG received" > messages, but nothing from the forked child (the working thread). > Ok, I will check it later. Regards, Pyun YongHyeon -- Pyun YongHyeon From owner-freebsd-pf@FreeBSD.ORG Fri Oct 8 14:13:53 2004 Return-Path: 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 02D6B16A4CE; Fri, 8 Oct 2004 14:13:53 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDE9043D31; Fri, 8 Oct 2004 14:13:52 +0000 (GMT) (envelope-from mlaier@FreeBSD.org) Received: from freefall.freebsd.org (mlaier@localhost [127.0.0.1]) i98EDq0q035294; Fri, 8 Oct 2004 14:13:52 GMT (envelope-from mlaier@freefall.freebsd.org) Received: (from mlaier@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i98EDqa9035290; Fri, 8 Oct 2004 14:13:52 GMT (envelope-from mlaier) Date: Fri, 8 Oct 2004 14:13:52 GMT From: Max Laier Message-Id: <200410081413.i98EDqa9035290@freefall.freebsd.org> To: ed@il.fontys.nl, mlaier@FreeBSD.org, mlaier@FreeBSD.org, pf@FreeBSD.org Subject: Re: kern/72444: PF can't properly detect interface after 'ifconfig XXX name YYY' X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.1 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, 08 Oct 2004 14:13:53 -0000 Synopsis: PF can't properly detect interface after 'ifconfig XXX name YYY' State-Changed-From-To: open->analyzed State-Changed-By: mlaier State-Changed-When: Fri Oct 8 14:12:36 GMT 2004 State-Changed-Why: Patch available for testing. Responsible-Changed-From-To: mlaier->pf Responsible-Changed-By: mlaier Responsible-Changed-When: Fri Oct 8 14:12:36 GMT 2004 Responsible-Changed-Why: Over to freebsd-pf mailinglist for review. http://www.freebsd.org/cgi/query-pr.cgi?pr=72444 From owner-freebsd-pf@FreeBSD.ORG Fri Oct 8 14:50:27 2004 Return-Path: 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 4D6C916A4CE for ; Fri, 8 Oct 2004 14:50:27 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28E0B43D2D for ; Fri, 8 Oct 2004 14:50:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i98EoRcu037001 for ; Fri, 8 Oct 2004 14:50:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i98EoQjv037000; Fri, 8 Oct 2004 14:50:26 GMT (envelope-from gnats) Date: Fri, 8 Oct 2004 14:50:26 GMT Message-Id: <200410081450.i98EoQjv037000@freefall.freebsd.org> To: pf@FreeBSD.org From: "Ed Schouten" Subject: Re: kern/72444: PF can't properly detect interface after 'ifconfig XXX name YYY' X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ed Schouten 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, 08 Oct 2004 14:50:27 -0000 The following reply was made to PR kern/72444; it has been noted by GNATS. From: "Ed Schouten" To: max@love2party.net Cc: freebsd-gnats-submit@freebsd.org Subject: Re: kern/72444: PF can't properly detect interface after 'ifconfig XXX name YYY' Date: Fri, 8 Oct 2004 16:49:44 +0200 (CEST) Hello Max, On Fri, October 8, 2004 3:58 pm, Max Laier said: > Can you try the attached patch to src/sys/contrib/pf/net/pf_if.c , please? I tried it and it works like a charm! Thanks for your quick response! :) Yours, -- Ed Schouten Website: http://g-rave.nl/