netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Vine <chris@cvine.freeserve.co.uk>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: xt_recent fails with kernel 3.19.0
Date: Thu, 12 Feb 2015 21:34:10 +0000	[thread overview]
Message-ID: <20150212213410.5a91da77@bother.homenet> (raw)
In-Reply-To: <20150212170931.GF22887@breakpoint.cc>

On Thu, 12 Feb 2015 18:09:31 +0100
Florian Westphal <fw@strlen.de> wrote:
[snip]
> > This patch seems to be doing
> > something different, and I note that nstamps_max_mask is
> > unconditionally set later in recent_mt_check() anyway.
> 
> No, its only set if recent_table_lookup returns NULL.
> We return soon after we bump the refcnt when we take this branch.

You probably are working on a more up-to-date branch.  Your patch
assigning to nstamps_max_mask is only executed if recent_table_lookup()
does not return NULL.  In the 3.19.0 kernel, the assignment to
nstamps_max_mask in line 404 also only occurs if recent_table_lookup()
does not return NULL.
 
> > Can the check for the value of hit_count simply be omitted?  In what
> > circumstances can it be anything other than true?
> 
> You mean when nstamp_mask > t->nstamps_max_mask is false?
> 
> e.g.
> iptables -A foo -m recent --hitcount 5
> iptables -A foo -m recent --hitcount 4
> 
> (2nd rule finds existing table with mask 7).

There's the rub I suspect, but as I say, I don't know your code.  Let's
leave it at that: if I apply the off-by-one patch it works for me
(provided I don't change settings, which I don't in ordinary usage).  I
will wait for whatever you and/or others come up with in due course to
solve it.

Chris

  reply	other threads:[~2015-02-12 21:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 10:25 xt_recent fails with kernel 3.19.0 Chris Vine
2015-02-12 10:51 ` Chris Vine
2015-02-12 11:09   ` Chris Vine
2015-02-12 11:36     ` Florian Westphal
2015-02-12 11:52       ` Florian Westphal
2015-02-12 17:04         ` Chris Vine
2015-02-12 17:09           ` Florian Westphal
2015-02-12 21:34             ` Chris Vine [this message]
2015-02-12 21:40               ` Florian Westphal
2015-02-12 21:57                 ` Chris Vine

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=20150212213410.5a91da77@bother.homenet \
    --to=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).