All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Florian Westphal <fw@strlen.de>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 3/3] expect: consider all expect attributes when comparing
Date: Wed, 5 Jun 2013 17:41:01 +0200	[thread overview]
Message-ID: <20130605154101.GC15131@breakpoint.cc> (raw)
In-Reply-To: <20130605073529.GA15131@breakpoint.cc>

Florian Westphal <fw@strlen.de> wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > > +static int
> > > +cmp_exp_timeout(const struct nf_expect *exp1, const struct nf_expect *exp2,
> > > +		unsigned int flags)
> > > +{
> > > +	return exp1->timeout == exp2->timeout;
> > > +}
> > 
> > The timeout comparison needs to implement the __NFCT_CMP_TIMEOUT
> > logic, similar to nfct_cmp. Otherwise nfexp_cmp will break in
> > conntrackd with expect sync mode.
> 
> You're right of course.  I'll implement this and send a v2 of this
> patch.

Hrm, I think a better option is to not compare the expectation timeout
in the first place.  I think the timeout is an irrelevant meta detail;
if the actual expectations are identical, nfexp_cmp should say so even
if they happen to have different timeouts.

In case users want a timeout compare, they could simply
nfexp_get_attr_u32(e1, ATTR_EXP_TIMEOUT) == ..._u32(e2, ATTR_EXP_TIMEOUT)?

  reply	other threads:[~2013-06-05 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-01 12:59 [PATCH lnf-conntrack 1/3] qa: add api test for nfct_cmp and nfct_exp functions Florian Westphal
2013-06-01 12:59 ` [PATCH 2/3] conntrack, expect: fix _cmp api with STRICT checking Florian Westphal
2013-06-01 12:59 ` [PATCH 3/3] expect: consider all expect attributes when comparing Florian Westphal
2013-06-05  2:51   ` Pablo Neira Ayuso
2013-06-05  7:35     ` Florian Westphal
2013-06-05 15:41       ` Florian Westphal [this message]
2013-06-05 17:46         ` Pablo Neira Ayuso
2013-06-05 20:33           ` Florian Westphal

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=20130605154101.GC15131@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.