All of lore.kernel.org
 help / color / mirror / Atom feed
From: primero <primero@fastwebnet.it>
To: "Tomá¹ Macek" <maca02@atlas.cz>, netfilter-devel@lists.netfilter.org
Subject: Re: libiptc ... and matches , seg fault
Date: Fri, 15 Jul 2005 10:06:28 +0200	[thread overview]
Message-ID: <42D76E84.7080906@fastwebnet.it> (raw)
In-Reply-To: <Pine.LNX.4.63.0507142117170.29183@localhost.localdomain>

Tomáš Macek wrote:

> Where points the me->version just before the step into the strcmp()?
> What this pointer contains?
>

each libipt_MATCH has to call a register_match() in his init function 
passing an "iptables_match" structure has argument that is referred as 
"me" inside the register_match function.

in my particular case me->version is equal to IPTABLES_VERSION (check 
out the libipt_tcp.c).

what could give such seg fault in a strcmp ?

bye
Francesco

> On Thu, 14 Jul 2005, Francesco Ciocchetti wrote:
>
>> Hi all ML.
>>
>> I'm tryng to develop a small apps with libiptc copyng as much as
>> possible from iptables.c
>>
>> i'm getting a segmentation fault when i call find_match with 'tcp' as
>> argument.
>>
>> searching with gdb i found that :
>>
>> my segfault arrives when in register_match
>>
>> if (strcmp(me->version, program_version) != 0) (line 1052 of iptables.c
>> 1.2.11)
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x0ff0b824 in strcmp () from /lib/tls/libc.so.6
>> (gdb) where
>> #0 0x0ff0b824 in strcmp () from /lib/tls/libc.so.6
>> #1 0x100083e8 in register_match ()
>> #2 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #3 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #4 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #5 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #6 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #7 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #8 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #9 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #10 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #11 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #12 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #13 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #14 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #15 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #16 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #17 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #18 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #19 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> #20 0x0fe53584 in _init () from /lib/iptables/libipt_tcp.so
>> Previous frame inner to this frame (corrupt stack?)
>>
>> If i missed some info don't esiatate to ask :)
>>
>> anyone has some hints?
>>
>> thx
>> Francesco
>>
>>
>>
>>
>>
>>
>>
>

  reply	other threads:[~2005-07-15  8:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-14 18:21 libiptc ... and matches , seg fault Francesco Ciocchetti
2005-07-14 19:18 ` Tomáš Macek
2005-07-15  8:06   ` primero [this message]
2005-07-15  8:12     ` Jan Engelhardt
2005-07-15  9:17       ` primero
2005-07-15  9:46         ` Tomáš Macek
2005-07-15  9:57           ` Francesco Ciocchetti
2005-07-15 10:11             ` Patrick Schaaf
2005-07-15 10:29               ` Francesco Ciocchetti
2005-07-15 13:08         ` Jan Engelhardt

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=42D76E84.7080906@fastwebnet.it \
    --to=primero@fastwebnet.it \
    --cc=maca02@atlas.cz \
    --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.