Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Ben Lentz <BLentz@channing-bete.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter@vger.kernel.org
Subject: Re: conntrack accounting
Date: Fri, 04 Jan 2008 16:35:32 -0500	[thread overview]
Message-ID: <477EA6A4.2000306@channing-bete.com> (raw)
In-Reply-To: <477DA70E.5080301@channing-bete.com>

[-- Attachment #1: Type: text/plain, Size: 174 bytes --]


> Syslog statistics mode still crashes... but only if I *disable* 
> LogFile, too.
>
I've fixed the crash when stats LogFile is off and stats Syslog is on, 
patch attached.

[-- Attachment #2: conntrack-tools_stats-syslog.patch --]
[-- Type: text/x-patch, Size: 553 bytes --]

--- src/log.c.orig	2008-01-04 16:26:50.000000000 -0500
+++ src/log.c	2008-01-04 16:30:26.000000000 -0500
@@ -99,13 +99,14 @@
 	time_t t;
 	char buf[1024];
 	char *tmp;
+		
+	t = time(NULL);
+	ctime_r(&t, buf);
+	tmp = buf + strlen(buf);
+	buf[strlen(buf)-1]='\t';
+	nfct_snprintf(buf+strlen(buf), 1024-strlen(buf), ct, 0, 0, 0);
 
 	if (fd) {
-		t = time(NULL);
-		ctime_r(&t, buf);
-		tmp = buf + strlen(buf);
-		buf[strlen(buf)-1]='\t';
-		nfct_snprintf(buf+strlen(buf), 1024-strlen(buf), ct, 0, 0, 0);
 		fprintf(fd, "%s\n", buf);
 		fflush(fd);
 	}

  reply	other threads:[~2008-01-04 21:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-30  2:39 conntrack accounting Ben Lentz
2008-01-03 15:54 ` Pablo Neira Ayuso
2008-01-03 18:12   ` Ben Lentz
2008-01-04  3:25     ` Ben Lentz
2008-01-04 21:35       ` Ben Lentz [this message]
2008-01-05 12:39         ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=477EA6A4.2000306@channing-bete.com \
    --to=blentz@channing-bete.com \
    --cc=netfilter@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox