From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH -next] netfilter: xt_recent: relax ip_pkt_list_tot restrictions
Date: Thu, 27 Nov 2014 13:06:15 +0100 [thread overview]
Message-ID: <20141127120615.GA30450@salvia> (raw)
In-Reply-To: <20141127120052.GE24801@breakpoint.cc>
On Thu, Nov 27, 2014 at 01:00:52PM +0100, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > On Thu, Nov 27, 2014 at 12:38:10PM +0100, Pablo Neira Ayuso wrote:
> > > On Mon, Nov 24, 2014 at 02:06:22PM +0100, Florian Westphal wrote:
> > > > The maximum value for the hitcount parameter is given by
> > > > "ip_pkt_list_tot" parameter (default: 20).
> > > >
> > > > Exceeding this value on the command line will cause the rule to be
> > > > rejected. The parameter is also readonly, i.e. it cannot be changed
> > > > without module unload or reboot.
> > > >
> > > > Store size per table, then base nstamps[] size on the hitcount instead.
> > > >
> > > > The module parameter is retained for backwards compatibility.
> > >
> > > Looks good to me.
> > >
> > > I'll mangle this patch with these small nitpicks, please let me know
> > > if you have any concern with those. Thanks Florian.
> > >
> > > diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c
> > > index cd691c1..df1dde2 100644
> > > --- a/net/netfilter/xt_recent.c
> > > +++ b/net/netfilter/xt_recent.c
> > > @@ -185,8 +185,7 @@ recent_entry_init(struct recent_table *t, const
> > > union nf_inet_addr *addr,
> > > }
> > >
> > > nstamps_max += 1;
> > > - e = kmalloc(sizeof(*e) + sizeof(e->stamps[0]) * nstamps_max,
> > > - GFP_ATOMIC);
> > > + e = kcalloc(nstamps_max, sizeof(*e) + sizeof(e->stamps[0]), GFP_ATOMIC);
> >
> > Forget this chunk, it resets to zero and this is not necessary.
>
> Right, its also not doing the same as before though ;-)
I need more coffee :-). Thanks Florian
prev parent reply other threads:[~2014-11-27 12:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-24 13:06 [PATCH -next] netfilter: xt_recent: relax ip_pkt_list_tot restrictions Florian Westphal
2014-11-27 11:38 ` Pablo Neira Ayuso
2014-11-27 11:39 ` Pablo Neira Ayuso
2014-11-27 12:00 ` Florian Westphal
2014-11-27 12:06 ` 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=20141127120615.GA30450@salvia \
--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.