From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Eric Leblond <eric@inl.fr>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: Bug in conntrack -U
Date: Mon, 04 Jun 2007 11:59:03 +0200 [thread overview]
Message-ID: <4663E267.1030900@netfilter.org> (raw)
In-Reply-To: <1180707433.4733.7.camel@ghlodit.inl.fr>
[-- Attachment #1: Type: text/plain, Size: 695 bytes --]
Eric Leblond wrote:
> I've found a problem with conntrack-tools. Running :
> conntrack -U -m 20 -s 192.168.50.140 -d 192.168.50.129 -p tcp --orig-port-src 43515 --orig-port-dst 22
> returns
> Operation failed: invalid parameters
>
> Problem has been verified with kernel 2.6.20 and 2.6.17 with subversion
> compiled libraries and conntrack-tools on 32bits and 64bits system. I
> did not find the time to test it on latest kernel.
The problem seems to be in libnetfilter_conntrack. The patch attached
should fix the problem. Thanks for the report.
--
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 730 bytes --]
Index: src/conntrack/build.c
===================================================================
--- src/conntrack/build.c (revisión: 6840)
+++ src/conntrack/build.c (copia de trabajo)
@@ -252,8 +252,13 @@
__build_tuple(req, size, &ct->tuple[__DIR_ORIG], CTA_TUPLE_ORIG);
__build_tuple(req, size, &ct->tuple[__DIR_REPL], CTA_TUPLE_REPLY);
- /* always build IPS_CONFIRMED */
- __build_status(req, size, ct);
+ if (test_bit(ATTR_STATUS, ct->set))
+ __build_status(req, size, ct);
+ else {
+ /* build IPS_CONFIRMED if we're creating a new conntrack */
+ if (type == IPCTNL_MSG_CT_NEW && flags & NLM_F_CREATE)
+ __build_status(req, size, ct);
+ }
if (test_bit(ATTR_TIMEOUT, ct->set))
__build_timeout(req, size, ct);
next prev parent reply other threads:[~2007-06-04 9:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-01 14:17 Bug in conntrack -U Eric Leblond
2007-06-04 9:59 ` Pablo Neira Ayuso [this message]
2007-06-04 16:05 ` Eric Leblond
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=4663E267.1030900@netfilter.org \
--to=pablo@netfilter.org \
--cc=eric@inl.fr \
--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.