Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Oct 2004 10:30: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:  <200410051030.51799.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

[-- Attachment #1 --]
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.

> 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).

-- 
/"\  Best regards,                      | mlaier@freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier@EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQBBYlu7XyyEoT62BG0RAtxlAJ9frrY49pHV4kJ6mULwBGSgZTBuQQCfQIvl
LXKmoUe9K8aMphRUw1BjMEI=
=MGnD
-----END PGP SIGNATURE-----

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