netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org, chris@cvine.freeserve.co.uk
Subject: Re: [PATCH] netfilter: xt_recent: don't reject rule if new hitcount exceeds table max
Date: Thu, 19 Feb 2015 00:45:08 +0100	[thread overview]
Message-ID: <20150218234508.GA21756@salvia> (raw)
In-Reply-To: <1423828070-10667-1-git-send-email-fw@strlen.de>

On Fri, Feb 13, 2015 at 12:47:50PM +0100, Florian Westphal wrote:
> given:
> -A INPUT -m recent --update --seconds 30 --hitcount 4
> and
> iptables-save > foo
> 
> then
> iptables-restore < foo
> 
> will fail with:
> kernel: xt_recent: hitcount (4) is larger than packets to be remembered (4) for table DEFAULT
> 
> Even when the check is fixed, the restore won't work if the hitcount is
> increased to e.g. 6, since by the time checkentry runs it will find the
> 'old' incarnation of the table.
> 
> We can avoid this by increasing the maximum threshold silently; we only
> have to rm all the current entries of the table (these entries would
> not have enough room to handle the increased hitcount).
> 
> This even makes (not-very-useful)
> -A INPUT -m recent --update --seconds 30 --hitcount 4
> -A INPUT -m recent --update --seconds 30 --hitcount 42
> work.

Applied, thanks Florian.

      reply	other threads:[~2015-02-18 23:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13 11:47 [PATCH] netfilter: xt_recent: don't reject rule if new hitcount exceeds table max Florian Westphal
2015-02-18 23:45 ` 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=20150218234508.GA21756@salvia \
    --to=pablo@netfilter.org \
    --cc=chris@cvine.freeserve.co.uk \
    --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 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).