bugzilla-daemon at netfilter.org
2021-Feb-01 14:25 UTC
[Bug 1495] New: set elements missing from json output
https://bugzilla.netfilter.org/show_bug.cgi?id=1495 Bug ID: 1495 Summary: set elements missing from json output Product: nftables Version: unspecified Hardware: x86_64 OS: All Status: NEW Severity: enhancement Priority: P5 Component: nft Assignee: pablo at netfilter.org Reporter: 5bbcc2f9 at opayq.com if I use the wiki example from page https://wiki.nftables.org/wiki-nftables/index.php/Meters: % nft add table my_filter_table % nft add chain my_filter_table my_input_chain {type filter hook input priority 0\;} % nft add set my_filter_table my_ssh_meter { type ipv4_addr\; flags dynamic \;} % nft add rule my_filter_table my_input_chain tcp dport 22 ct state new add @my_ssh_meter { ip saddr limit rate 10/second } accept the text listing of the ruleset is correct: % nft list ruleset table ip my_filter_table { set my_ssh_meter { type ipv4_addr size 65535 flags dynamic } chain my_input_chain { type filter hook input priority filter; policy accept; tcp dport 22 ct state new add @my_ssh_meter { ip saddr limit rate 10/second } accept } } the json version of the same thing appears to omit the rate limiting clause: % nft -j list ruleset {"nftables": [{"metainfo": {"version": "0.9.8", "release_name": "E.D.S.", "json_schema_version": 1}}, {"table": {"family": "ip", "name": "my_filter_table", "handle": 39}}, {"set": {"family": "ip", "name": "my_ssh_meter", "table": "my_filter_table", "type": "ipv4_addr", "handle": 2, "size": 65535}}, {"chain": {"family": "ip", "table": "my_filter_table", "name": "my_input_chain", "handle": 1, "type": "filter", "hook": "input", "prio": 0, "policy": "accept"}}, {"rule": {"family": "ip", "table": "my_filter_table", "chain": "my_input_chain", "handle": 3, "expr": [{"match": {"op": "==", "left": {"payload": {"protocol": "tcp", "field": "dport"}}, "right": 22}}, {"match": {"op": "in", "left": {"ct": {"key": "state"}}, "right": "new"}}, {"set": {"op": "add", "elem": {"payload": {"protocol": "ip", "field": "saddr"}}, "set": "@my_ssh_meter"}}, {"accept": null}]}}]} As a easy check, the number "10" does not appear in the json output, but does in the text output. -- You are receiving this mail because: You are watching all bug changes. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20210201/b0289fda/attachment.html>
bugzilla-daemon at netfilter.org
2021-Feb-01 14:26 UTC
[Bug 1495] set elements missing from json output
https://bugzilla.netfilter.org/show_bug.cgi?id=1495 5bbcc2f9 at opayq.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20210201/1366c768/attachment.html>
bugzilla-daemon at netfilter.org
2021-Feb-01 14:28 UTC
[Bug 1495] set elements missing from json output
https://bugzilla.netfilter.org/show_bug.cgi?id=1495 --- Comment #1 from 5bbcc2f9 at opayq.com --- The version I am reporting this against is nftables v0.9.8 (E.D.S.) -- You are receiving this mail because: You are watching all bug changes. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20210201/a198b287/attachment.html>