From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Liping Zhang <zlpnobody@163.com>
Cc: netfilter-devel@vger.kernel.org, rwhite@pobox.com,
Liping Zhang <zlpnobody@gmail.com>
Subject: Re: [PATCH nf] netfilter: nft_dynset: continue to next expr if _OP_ADD succeeded
Date: Tue, 25 Apr 2017 11:14:36 +0200 [thread overview]
Message-ID: <20170425091436.GA3527@salvia> (raw)
In-Reply-To: <1492943370-38461-1-git-send-email-zlpnobody@163.com>
On Sun, Apr 23, 2017 at 06:29:30PM +0800, Liping Zhang wrote:
> From: Liping Zhang <zlpnobody@gmail.com>
>
> Currently, after adding the following nft rules:
> # nft add set x target1 { type ipv4_addr \; flags timeout \;}
> # nft add rule x y set add ip daddr timeout 1d @target1 counter
>
> the counters will always be zero despite of the elements are added
> to the dynamic set "target1" or not, as we will break the nft expr
> traversal unconditionally:
> # nft list ruleset
> ...
> set target1 {
> ...
> elements = { 8.8.8.8 expires 23h59m53s}
> }
> chain output {
> ...
> set add ip daddr timeout 1d @target1 counter packets 0 bytes 0
> ^ ^
> ...
> }
>
> Since we add the elements to the set successfully, we should continue
> to the next expression.
>
> Additionally, if elements are added to "flow table" successfully, we
> will _always_ continue to the next expr, even if the operation is
> _OP_ADD. So it's better to keep them to be consistent.
Applied, thanks.
prev parent reply other threads:[~2017-04-25 9:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-23 10:29 [PATCH nf] netfilter: nft_dynset: continue to next expr if _OP_ADD succeeded Liping Zhang
2017-04-25 9:14 ` 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=20170425091436.GA3527@salvia \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=rwhite@pobox.com \
--cc=zlpnobody@163.com \
--cc=zlpnobody@gmail.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 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.