Re: conntrack accounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux