From: "Anders K. Pedersen" <akp@akp.dk>
To: netfilter@vger.kernel.org, netfilter-devel@vger.kernel.org,
Pablo Neira Ayuso <pablo@netfilter.org>
Subject: Re: nftables: Dynamically updating sets gives syntax error
Date: Sat, 02 Jul 2016 16:12:56 +0200 [thread overview]
Message-ID: <1467468776.1011.14.camel@akp.dk> (raw)
In-Reply-To: <1466861422.29189.75.camel@akp.dk>
Hello,
On lør, 2016-06-25 at 15:30 +0200, Anders K. Pedersen wrote:
> With nftables 0.6 I'm getting a syntax error, when I try to use the
> feature that was introduced
> by http://git.netfilter.org/nftables/commit
> /?id=a9467e55973b10c2e8fe37525514c961580f8506 . For example:
>
> # nft filter input set add tcp dport @myset
> <cmdline>:1:26-30: Error: syntax error, unexpected dport
> filter input set add tcp dport @myset
> ^^^^^
> # nft filter input set add ip saddr timeout 10s @myset
> <cmdline>:1:25-29: Error: syntax error, unexpected saddr
> filter input set add ip saddr timeout 10s @myset
> ^^^^^
> # nft filter input set update ip saddr timeout 10s @myset
> <cmdline>:1:28-32: Error: syntax error, unexpected saddr
> filter input set update ip saddr timeout 10s @myset
> ^^^^^
I did a git bisect on this and found that it was broken by
commit a3e60492a684be09374d0649735da42bdadc6b48
Author: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Sun Dec 27 22:15:17 2015 +0100
parser: restrict relational rhs expression recursion
After studying it a bit I reverted a part of it with the following
change, which made the commands above work again:
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -2054,7 +2054,7 @@ set_elem_option : TIMEOUT time_spec
}
;
-set_lhs_expr : concat_rhs_expr
+set_lhs_expr : concat_expr
| multiton_rhs_expr
;
The commit message indicated that it intended to handle rhs
expressions, but this is a lhs expression, so maybe this change was
unintended?
Regards,
Anders K. Pedersen
next parent reply other threads:[~2016-07-02 14:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1466861422.29189.75.camel@akp.dk>
2016-07-02 14:12 ` Anders K. Pedersen [this message]
2016-07-12 15:22 ` nftables: Dynamically updating sets gives syntax error Pablo Neira Ayuso
2016-07-13 7:14 ` Anders K. Pedersen
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=1467468776.1011.14.camel@akp.dk \
--to=akp@akp.dk \
--cc=netfilter-devel@vger.kernel.org \
--cc=netfilter@vger.kernel.org \
--cc=pablo@netfilter.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).