All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira <pablo@eurodev.net>
To: Wang Jian <lark@linux.net.cn>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: conntrack-tool core dumps
Date: Tue, 19 Apr 2005 12:44:41 +0200	[thread overview]
Message-ID: <4264E119.5010506@eurodev.net> (raw)
In-Reply-To: <20050418173034.0372.LARK@linux.net.cn>

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

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

[-- Attachment #2: x --]
[-- Type: text/plain, Size: 500 bytes --]

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) {

  parent reply	other threads:[~2005-04-19 10:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-18  9:38 conntrack-tool core dumps Wang Jian
2005-04-18 15:35 ` Amin Azez
2005-04-18 17:03   ` Wang Jian
2005-04-20 12:11     ` conntrack session information Amin Azez
2005-04-20 13:35       ` Wang Jian
2005-04-20 13:50         ` Amin Azez
2005-04-20 14:18           ` Wang Jian
2005-04-20 13:52         ` Amin Azez
2005-04-19 10:44 ` Pablo Neira [this message]
2005-04-19 12:29   ` conntrack-tool core dumps Wang Jian

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=4264E119.5010506@eurodev.net \
    --to=pablo@eurodev.net \
    --cc=lark@linux.net.cn \
    --cc=netfilter-devel@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.