From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: lnf_conntrack: nfct_cmp NFCT_CMP_TIMEOUT_* flags not supported?
Date: Wed, 28 Nov 2012 16:33:51 +0100 [thread overview]
Message-ID: <20121128153351.GG14156@breakpoint.cc> (raw)
In-Reply-To: <20121128151606.GA13155@1984>
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > So, my question is:
> > How are the NFCT_CMP_TIMEOUT flags supposed to be used?
>
> They planned to be used by the conntrack utility. To obtain timers
> that are over/under some given timeout. But that was never
> implemented, so that code has remain untested there so far until
> someone has come to show some interest on it ;-).
Alright, I'll hold off with this change, then.
Problem is that this change:
> > diff --git a/src/conntrack/compare.c b/src/conntrack/compare.c
> > index b18f7fc..7cd28e7 100644
> > --- a/src/conntrack/compare.c
> > +++ b/src/conntrack/compare.c
> > @@ -407,5 +407,8 @@ int __compare(const struct nf_conntrack *ct1,
> > if (flags & NFCT_CMP_REPL && !cmp_repl(ct1, ct2, flags))
> > return 0;
> >
> > + if (flags & (NFCT_CMP_TIMEOUT_GT|NFCT_CMP_TIMEOUT_LE))
> > + return cmp_meta(ct1, ct2, flags);
> > +
> > return 1;
> > }
... is wrong after all.
IMO e.g. NFCT_CMP_TIMEOUT_EQ means that the comparision is valid
when the timeout is equal. But above code means that its
valid when the timeout is equal AND all the other meta flags are
equal, too. And thats very un-intuitive.
Regards,
Florian
prev parent reply other threads:[~2012-11-28 15:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 12:59 lnf_conntrack: nfct_cmp NFCT_CMP_TIMEOUT_* flags not supported? Florian Westphal
2012-11-28 15:16 ` Pablo Neira Ayuso
2012-11-28 15:33 ` Florian Westphal [this message]
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=20121128153351.GG14156@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@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.