From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH 0/3] netfilter: add connlabel conntrack extension
Date: Fri, 16 Nov 2012 12:52:23 +0100 [thread overview]
Message-ID: <20121116115223.GB333@1984> (raw)
In-Reply-To: <20121116113109.GK20678@breakpoint.cc>
On Fri, Nov 16, 2012 at 12:31:09PM +0100, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > On Thu, Nov 15, 2012 at 04:55:12PM +0100, Florian Westphal wrote:
> > > Changes since RFCv2:
> > > - make it a variable-size extension and remove dynamic
> > > reallocation of the label array
> > > - add ctnetlink support for receiving/setting labels
> > > - limit to 128 instead of 1k labels due to limited extension
> > > space (128 is more than enough for now, so this is no problem).
> >
> > At a quick glance I like this round, you got this simplified :-).
> >
> > My only concern is that (if I'm not missing anything) it
> > inconditionally add the extension even if we don't need it.
>
> Its conditional:
>
> words = ACCESS_ONCE(net->ct.label_words);
> if (words == 0 || WARN_ON_ONCE(words > 8))
> return NULL;
> cl_ext = nf_ct_ext_add_length(ct, NF_CT_EXT_LABELS, words * sizeof(long),..
>
> xt_connlabel increases "label_words" to a non-zero
> value based on the highest bit it saw so far. So e.g. when bit 32 is
> requested, a 32-bit machine kernel will set words to 2, and
> a 64 bit kernel to 1, thus turning the extension on for new connections.
>
> The only drawback is that when you add a connlabel rule for bits 127,
> then for bit 1, then delete the first rule again words will be larger
> than one.
>
> But i think this ok (I don't want to add per-bit refcountr :-) )
I see. Let me give a more look in-depth, in any case this version
seems reasonable to be included mainstream :-).
Regards.
prev parent reply other threads:[~2012-11-16 11:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-15 15:55 [PATCH 0/3] netfilter: add connlabel conntrack extension Florian Westphal
2012-11-15 15:55 ` [PATCH 1/3] " Florian Westphal
2012-11-15 15:55 ` [PATCH 2/3] netfilter: ctnetlink: deliver labels to userspace via CTA_LABELS attribute Florian Westphal
2012-11-15 15:55 ` [PATCH 3/3] netfilter: ctnetlink: allow userspace to set labels Florian Westphal
2012-11-27 11:18 ` Pablo Neira Ayuso
2012-11-27 11:50 ` Florian Westphal
2012-11-27 12:31 ` Pablo Neira Ayuso
2012-11-27 13:09 ` Florian Westphal
2012-11-27 14:13 ` Pablo Neira Ayuso
2012-11-27 14:24 ` Florian Westphal
2012-11-30 13:58 ` Pablo Neira Ayuso
2012-11-30 14:02 ` Florian Westphal
2012-11-30 18:34 ` Pablo Neira Ayuso
2012-11-30 21:36 ` Florian Westphal
2012-12-03 11:04 ` Pablo Neira Ayuso
2012-12-03 11:13 ` Florian Westphal
2012-12-03 12:58 ` Pablo Neira Ayuso
2012-11-27 12:39 ` Pablo Neira Ayuso
2012-11-16 10:02 ` [PATCH 0/3] netfilter: add connlabel conntrack extension Pablo Neira Ayuso
2012-11-16 11:31 ` Florian Westphal
2012-11-16 11:52 ` Pablo Neira Ayuso [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=20121116115223.GB333@1984 \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--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.