From: Florian Westphal <fw@strlen.de>
To: Ken-ichirou MATSUZAWA <chamaken@gmail.com>
Cc: Florian Westphal <fw@strlen.de>,
The netfilter developer mailinglist
<netfilter-devel@vger.kernel.org>,
Pablo Neira Ayuso <pablo@netfilter.org>
Subject: Re: [RFC PATCH 1/1 libnetfilter_conntrack] zero value handling of mark and zone
Date: Thu, 12 Jun 2014 11:48:43 +0200 [thread overview]
Message-ID: <20140612094842.GA1982@breakpoint.cc> (raw)
In-Reply-To: <CAGCkEt02-WGJBKBr8kkDYq0uBk84bovuXp2wkKw5SDuypSEFhg@mail.gmail.com>
Ken-ichirou MATSUZAWA <chamaken@gmail.com> wrote:
> I see, thanks.
>
> > when we hit the NFCT_CMP_STRICT conditional, i.e.
>
> # I may not understand what you told me...
Understandable, I meant CMP_MASK. But I think we can
get away with an even simpler change.
What about this:
static int cmp_zone(const struct nf_conntrack *ct1,
const struct nf_conntrack *ct2, unsigned int flags)
{
return nfct_get_attr_u16(ct1, ATTR_ZONE) == nfct_get_attr_u16(ct2, ATTR_ZONE);
}
Then it should be sufficient to not call __cmp at all, i.e.:
- if (!__cmp(ATTR_ZONE, ct1, ct2, flags, cmp_zone))
+ if (!cmp_zone(ct1, ct2, flags))
ct1 and ct2 zones would then always be equal except if
both have ATTR_ZONE set and the zones are different.
What do you think?
next prev parent reply other threads:[~2014-06-12 9:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 23:42 [RFC PATCH 1/1 libnetfilter_conntrack] zero value handling of mark and zone Ken-ichirou MATSUZAWA
2014-06-12 0:18 ` Florian Westphal
2014-06-12 5:19 ` Ken-ichirou MATSUZAWA
2014-06-12 9:48 ` Florian Westphal [this message]
2014-06-12 11:33 ` Ken-ichirou MATSUZAWA
2014-06-12 11:59 ` Florian Westphal
2014-06-12 13:43 ` Ken-ichirou MATSUZAWA
2014-06-12 14:05 ` Florian Westphal
2014-06-12 23:12 ` Ken-ichirou MATSUZAWA
2014-06-16 0:04 ` Ken-ichirou MATSUZAWA
2014-06-16 11:41 ` Florian Westphal
2014-06-16 13:20 ` Ken-ichirou MATSUZAWA
2014-06-16 13:24 ` 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=20140612094842.GA1982@breakpoint.cc \
--to=fw@strlen.de \
--cc=chamaken@gmail.com \
--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.