From: Phil Sutter <phil@nwl.cc>
To: "Christian Göttsche" <cgzones@googlemail.com>
Cc: netfilter-devel@vger.kernel.org, Pablo Neira Ayuso <pablo@netfilter.org>
Subject: nft: secmark output not understood by parser
Date: Thu, 31 Oct 2019 11:45:50 +0100 [thread overview]
Message-ID: <20191031104550.GA8531@orbyte.nwl.cc> (raw)
Hi,
Looks like secmark support is broken:
| # nft add table t
| # nft add chain t c
| # nft add secmark t ssh \"system_u:object_r:ssh_server_packet_t:s0\"
| # nft add rule t c tcp dport 22 meta secmark set ssh
| # nft list ruleset
| table ip t {
| secmark ssh {
| "system_u:object_r:ssh_server_packet_t:s0"
| }
|
| chain c {
| tcp dport 22 secmark name "ssh"
| }
| }
| # nft list ruleset >/tmp/nft.dump
| # nft -f /tmp/nft.dump
| /tmp/nft.dump:7:16-22: Error: syntax error, unexpected secmark, expecting newline or semicolon
| tcp dport 22 secmark name "ssh"
| ^^^^^^^
Output should ideally match input or at least be accepted by nft when
fed back. Could you please have a look?
Apart from the above, this should be documented in nft.8 and
libnftables-json.5. Adding a test would help as well, at least in
tests/shell. AFAICT, integration into tests/py might be more work since
this thing does not support anonymous secmark objects, right?
Thanks, Phil
reply other threads:[~2019-10-31 10:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20191031104550.GA8531@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=cgzones@googlemail.com \
--cc=netfilter-devel@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).