Re: [ULOGD 1/4] rework NFCT to use a generic hashtable [was Re: [ULOGD 1/4] improve netlink overrun handling of NFCT]

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

 



Hello,

On Friday, 2008 May 16 at 12:52:38 +0200, Pablo Neira Ayuso wrote:
> Eric Leblond wrote:
> > Hello,
> > 
> > On Thursday, 2008 May 15 at 15:48:38 +0200, Pablo Neira Ayuso wrote:
> 
> Missing chunks. Sorry. Attached a new patch.

Ok, that's better but the latest subversion^W git version of
libnetfilter_conntrack is needed to compile.

I've got some remaark regarding the patch:

>  struct ct_timestamp {
> -	struct llist_head list;
>  	struct timeval time[__TIME_MAX];
> -	int id;
> -};

Why do we get completly get rid of the ID ? It will be available in the
upcoming kernel version and it will be more efficient to use it if the
kernel has support for it.

> -	if (type == NFCT_MSG_NEW) {
> -		if (usehash_ce(upi->config_kset).u.value != 0) {
> -			ct_hash_add(cpi->ct_active, nfct_get_attr_u32(ct, ATTR_ID));
> -			return 0;
> +	if (usehash_ce(upi->config_kset).u.value == 0)
> +		return NFCT_CB_CONTINUE;

This one is really rude ! it is equivalent to no logging at all if we
don't use the hash system.

I've encounter an other problem which is that hash.c is not compiled
because it has not been included in a Makefile.am (at least it is not in
the patch).

I will send soon a rework of my patch about timestamp issue with a modification
of this behaviour (in testing phase for now).

I attach the makefile.am modification to the mail.

BR,
-- 
Eric Leblond
INL: http://www.inl.fr/
NuFW: http://www.nufw.org/
From 652727c21c498d6a3746a849497fc439ce64ab1a Mon Sep 17 00:00:00 2001
From: Eric Leblond <eric@xxxxxx>
Date: Sun, 18 May 2008 01:19:10 +0200
Subject: [PATCH] Add forgotten file hash.c.

This patch adds hash.c to src/Makefile.am.

Signed-off-by: Eric Leblond <eric@xxxxxx>
---
 src/Makefile.am |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 67f404e..360701f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,5 +5,5 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include \
 
 sbin_PROGRAMS = ulogd
 
-ulogd_SOURCES = ulogd.c select.c timer.c rbtree.c conffile.c
+ulogd_SOURCES = ulogd.c select.c timer.c rbtree.c hash.c conffile.c
 ulogd_LDFLAGS = -export-dynamic
-- 
1.5.4.3

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux