[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netfilter-devel
Subject:    Re: conntrack-tool core dumps
From:       Pablo Neira <pablo () eurodev ! net>
Date:       2005-04-19 10:44:41
Message-ID: 4264E119.5010506 () eurodev ! net
[Download RAW message or body]

Wang Jian wrote:
> Hi,
> 
> When some packets hit the box, conntrack-tool core dumps, below is
> backtrace
> 
> [root@qos conntrack-tool]# gdb conntrack core.3023 
> ...
> Loaded symbols for extensions/libct_proto_tcp.so
> #0  0xb7f1fc2a in strcmp () from /lib/tls/libc.so.6
> (gdb) bt
> #0  0xb7f1fc2a in strcmp () from /lib/tls/libc.so.6
> #1  0x0804aaf8 in findproto (name=0x0) at src/libct.c:429
> #2  0x0804a301 in event_handler (sock=0xbffff710, nlh=0xbfffd75c, 
>     arg=0xbffff770) at src/libct.c:181
> #3  0x0804ae9c in list_conntrack_handler ()
> #4  0x0804bb4b in nfnl_listen ()
> #5  0x0804b08d in ctnl_event_conntrack ()
> #6  0x0804aa82 in event_conntrack () at src/libct.c:413
> #7  0x08049d05 in main (argc=3, argv=0xbffff904) at src/conntrack.c:458
> (gdb) up
> #1  0x0804aaf8 in findproto (name=0x0) at src/libct.c:429
> 429                     if (strcmp(cur->name, name) == 0) {
> (gdb) print cur
> $1 = (struct ctproto_handler *) 0xb7fe9b60
> (gdb) print name
> $2 = 0x0
> (gdb) print cur->name
> $3 = 0xb7fe89a7 "tcp"

The patch attached must fix your problem. I'll commit to SVN asap.

--
Pablo

["x" (text/plain)]

Index: src/libct.c
===================================================================
--- src/libct.c	(revision 3881)
+++ src/libct.c	(working copy)
@@ -462,6 +462,12 @@
 	struct list_head *i;
 	struct ctproto_handler *cur = NULL, *handler = NULL;
 
+	/* This protocol has no handler, use generic and we are done */
+	if (!name) {
+		handler = &generic_handler;
+		return handler;
+	}
+
 	list_for_each(i, &proto_list) {
 		cur = (struct ctproto_handler *) i;
 		if (strcmp(cur->name, name) == 0) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic