From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: Re: Conntrackd segfaults
Date: Tue, 29 Apr 2008 14:44:47 +0200 [thread overview]
Message-ID: <4817183F.1090701@netfilter.org> (raw)
In-Reply-To: <20080428214328.GB17500@outback.rfc2324.org>
[-- Attachment #1: Type: text/plain, Size: 381 bytes --]
Hi Max,
Maximilian Wilhelm wrote:
> The problem seems to be that in
>
> libnetfilter-conntrack /src/conntrack/getter.c
>
> in line 225
>
> get_attr get_attr_array[]
>
> has no entry for
>
> ATTR_MASTER_IPV4_SRC
>
> Maybe anybody who's in this magic can fix it :)
Fixed in SVN. Thanks for the detailed report.
--
"Los honestos son inadaptados sociales" -- Les Luthiers
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 2443 bytes --]
Index: src/conntrack/api.c
===================================================================
--- src/conntrack/api.c (revisión: 7495)
+++ src/conntrack/api.c (copia de trabajo)
@@ -289,6 +289,8 @@
return NULL;
}
+ assert(get_attr_array[type]);
+
return get_attr_array[type](ct);
}
Index: src/conntrack/getter.c
===================================================================
--- src/conntrack/getter.c (revisión: 7428)
+++ src/conntrack/getter.c (copia de trabajo)
@@ -102,6 +102,46 @@
return &ct->tuple[__DIR_REPL].protonum;
}
+static const void *get_attr_master_ipv4_src(const struct nf_conntrack *ct)
+{
+ return &ct->tuple[__DIR_MASTER].src.v4;
+}
+
+static const void *get_attr_master_ipv4_dst(const struct nf_conntrack *ct)
+{
+ return &ct->tuple[__DIR_MASTER].dst.v4;
+}
+
+static const void *get_attr_master_ipv6_src(const struct nf_conntrack *ct)
+{
+ return &ct->tuple[__DIR_MASTER].src.v6;
+}
+
+static const void *get_attr_master_ipv6_dst(const struct nf_conntrack *ct)
+{
+ return &ct->tuple[__DIR_MASTER].dst.v6;
+}
+
+static const void *get_attr_master_port_src(const struct nf_conntrack *ct)
+{
+ return &ct->tuple[__DIR_MASTER].l4src.all;
+}
+
+static const void *get_attr_master_port_dst(const struct nf_conntrack *ct)
+{
+ return &ct->tuple[__DIR_MASTER].l4dst.all;
+}
+
+static const void *get_attr_master_l3proto(const struct nf_conntrack *ct)
+{
+ return &ct->tuple[__DIR_MASTER].l3protonum;
+}
+
+static const void *get_attr_master_l4proto(const struct nf_conntrack *ct)
+{
+ return &ct->tuple[__DIR_MASTER].protonum;
+}
+
static const void *get_attr_tcp_state(const struct nf_conntrack *ct)
{
return &ct->protoinfo.tcp.state;
@@ -265,6 +305,14 @@
[ATTR_TCP_FLAGS_REPL] = get_attr_tcp_flags_repl,
[ATTR_TCP_MASK_ORIG] = get_attr_tcp_mask_orig,
[ATTR_TCP_MASK_REPL] = get_attr_tcp_mask_repl,
+ [ATTR_MASTER_IPV4_SRC] = get_attr_master_ipv4_src,
+ [ATTR_MASTER_IPV4_DST] = get_attr_master_ipv4_dst,
+ [ATTR_MASTER_IPV6_SRC] = get_attr_master_ipv6_src,
+ [ATTR_MASTER_IPV6_DST] = get_attr_master_ipv6_dst,
+ [ATTR_MASTER_PORT_SRC] = get_attr_master_port_src,
+ [ATTR_MASTER_PORT_DST] = get_attr_master_port_dst,
+ [ATTR_MASTER_L3PROTO] = get_attr_master_l3proto,
+ [ATTR_MASTER_L4PROTO] = get_attr_master_l4proto,
[ATTR_SECMARK] = get_attr_secmark,
[ATTR_ORIG_NAT_SEQ_CORRECTION_POS] = get_attr_orig_cor_pos,
[ATTR_ORIG_NAT_SEQ_OFFSET_BEFORE] = get_attr_orig_off_bfr,
next prev parent reply other threads:[~2008-04-29 12:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-28 21:43 Conntrackd segfaults Maximilian Wilhelm
2008-04-29 12:44 ` Pablo Neira Ayuso [this message]
2008-04-30 13:06 ` Maximilian Wilhelm
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=4817183F.1090701@netfilter.org \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.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.