From: Luciano Coelho <luciano.coelho@nokia.com>
To: ext Jan Engelhardt <jengelh@medozas.de>
Cc: Netfilter Developer Mailing List
<netfilter-devel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Patrick McHardy <kaber@trash.net>,
"sameo@linux.intel.com" <sameo@linux.intel.com>
Subject: Re: [RFC 1/2] netfilter: xt_condition: export list management code
Date: Mon, 19 Jul 2010 22:31:21 +0300 [thread overview]
Message-ID: <1279567881.11662.104.camel@powerslave> (raw)
In-Reply-To: <1279566876.11662.102.camel@powerslave>
On Mon, 2010-07-19 at 21:14 +0200, Coelho Luciano (Nokia-MS/Helsinki)
wrote:
> On Mon, 2010-07-19 at 18:13 +0200, ext Jan Engelhardt wrote:
> > On Monday 2010-07-19 16:15, Luciano Coelho wrote:
> > >@@ -3,12 +3,27 @@
> > >
> > > #include <linux/types.h>
> > >
> > >+#define XT_CONDITION_MAX_NAME_SIZE 30
> > >+
> > > struct xt_condition_mtinfo {
> > >- char name[31];
> > >+ char name[XT_CONDITION_MAX_NAME_SIZE + 1];
> > > __u8 invert;
> >
> > Oh noes. Please please avoid any math operations inside []. It has
> > already driven XT_FUNCTION_MAXNAMELEN into nuts ("was it now +1 or -1,
> > or even -2 that we needed to pass for various functions?"). Just let MAX
> > be 31 and have name[MAX].
>
> Yeah, I had already done as you suggested in my previous module
> (IDLETIMER), I don't know what I had in my head today when I did it
> differently. Even the name of the macro is totally wrong (_SIZE), it
> would make a tiny little bit more sense if it was _LEN. I'll change it.
I was not very clear here, I meant I'll change to what you proposed, ie.
keep it _SIZE and use 31, of course.
--
Cheers,
Luca.
next prev parent reply other threads:[~2010-07-19 19:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-19 14:15 [RFC 0/2] netfilter: xtables: CONDITION target implementation Luciano Coelho
2010-07-19 14:15 ` [RFC 1/2] netfilter: xt_condition: export list management code Luciano Coelho
2010-07-19 16:13 ` Jan Engelhardt
2010-07-19 19:14 ` Luciano Coelho
2010-07-19 19:31 ` Luciano Coelho [this message]
2010-07-19 14:15 ` [RFC 2/2] netfilter: xtables: implement CONDITION target Luciano Coelho
2010-07-19 14:27 ` [RFC 0/2] netfilter: xtables: CONDITION target implementation Changli Gao
2010-07-19 14:31 ` Luciano Coelho
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=1279567881.11662.104.camel@powerslave \
--to=luciano.coelho@nokia.com \
--cc=jengelh@medozas.de \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=sameo@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).