[prev in list] [next in list] [prev in thread] [next in thread]
List: ulogd
Subject: Re: [ulogd] ulogd-1.00 segfault on rh9 WAS: ulogd 0.98 segfault on RH9
From: Harald Welte <laforge () gnumonks ! org>
Date: 2003-04-27 7:40:58
[Download RAW message or body]
On Sat, Apr 26, 2003 at 02:40:52PM -0700, Curtis Doty wrote:
> I dug deeper, and the PCAP plugin appears to test ULOGD_RETF_VALID but my
> kernel is returning a valid (but bogus) timestamp in the skb. Find a
> workaround attached.
Version 1.17 of ulogd_BASE.c includes the following patch, which should
be a more generic solution to the problem. Can you please verify that
the problem has disappeared now?
Thanks.
diff -u -r1.16 ulogd_BASE.c
--- extensions/ulogd_BASE.c 2003/01/13 13:35:58 1.16
+++ extensions/ulogd_BASE.c 2003/04/27 07:43:04
@@ -111,10 +111,17 @@
ret[0].value.ptr = pkt->prefix;
ret[0].flags |= ULOGD_RETF_VALID;
- ret[1].value.ui32 = pkt->timestamp_sec;
- ret[1].flags |= ULOGD_RETF_VALID;
- ret[2].value.ui32 = pkt->timestamp_usec;
- ret[2].flags |= ULOGD_RETF_VALID;
+
+ if (pkt->timestamp_sec || pkt->timestamp_usec) {
+ ret[1].value.ui32 = pkt->timestamp_sec;
+ ret[1].flags |= ULOGD_RETF_VALID;
+ ret[2].value.ui32 = pkt->timestamp_usec;
+ ret[2].flags |= ULOGD_RETF_VALID;
+ } else {
+ ret[1].flags &= ~ULOGD_RETF_VALID;
+ ret[2].flags &= ~ULOGD_RETF_VALID;
+ }
+
ret[3].value.ui32 = pkt->mark;
ret[3].flags |= ULOGD_RETF_VALID;
ret[4].value.ptr = pkt->indev_name;
--
- Harald Welte <laforge@gnumonks.org> http://www.gnumonks.org/
============================================================================
Programming is like sex: One mistake and you have to support it your lifetime
[Attachment #3 (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic