Date: Mon, 4 Oct 2004 11:04:44 +0200 From: Max Laier <max@love2party.net> To: freebsd-pf@freebsd.org, yongari@kt-is.co.kr Subject: Re: Shutting down pflogd gracefully Message-ID: <200410041104.51591.max@love2party.net> In-Reply-To: <20041004074553.GB1226@kt-is.co.kr> References: <20041004074553.GB1226@kt-is.co.kr>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410041104.51591.max>