bugzilla-daemon at netfilter.org
2019-Jan-24 05:12 UTC
[Bug 1319] New: Exporting a map with many elements to JSON will fail
https://bugzilla.netfilter.org/show_bug.cgi?id=1319 Bug ID: 1319 Summary: Exporting a map with many elements to JSON will fail Product: nftables Version: unspecified Hardware: x86_64 OS: RedHat Linux Status: NEW Severity: normal Priority: P5 Component: nft Assignee: pablo at netfilter.org Reporter: mizuno at axsh.net When exporting a map with many(more than 32?) elements to JSON, broken JSON will be output. ---- #!/bin/bash nft "add table ip ttt" nft "add map ip ttt my_map { type ipv4_addr : ipv4_addr ; }" for i in $(seq 1 33); do nft "add element ip ttt my_map { 203.0.113.${i} : 192.0.2.1 }" done nft export json | jq .nftables ---- The above script throws the following error: parse error: Unmatched ']' at line 1, column 4257 This error can be avoided by rewriting the last line as follows: nft export json | sed 's/]}$/}]}/' | jq .nftables It seems to be caused by missing closing } of the "set" object. ---- % nft --version nftables v0.8 (Joe Btfsplk) % uname -a Linux devops 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux ---- Thanks. -- 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/20190124/e82a03cf/attachment.html>
bugzilla-daemon at netfilter.org
2020-Jan-28 22:49 UTC
[Bug 1319] Exporting a map with many elements to JSON will fail
https://bugzilla.netfilter.org/show_bug.cgi?id=1319 kfm at plushkava.net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kfm at plushkava.net -- 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/20200128/52cf55c5/attachment.html>
bugzilla-daemon at netfilter.org
2020-Aug-26 07:36 UTC
[Bug 1319] Exporting a map with many elements to JSON will fail
https://bugzilla.netfilter.org/show_bug.cgi?id=1319 --- Comment #1 from kfm at plushkava.net --- This issue appears to have been resolved. The given test case works in nftables v0.9.6, after changing "nft export json" to "nft -j list ruleset". -- 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/20200826/036c863e/attachment-0001.html>
bugzilla-daemon at netfilter.org
2020-Sep-08 19:10 UTC
[Bug 1319] Exporting a map with many elements to JSON will fail
https://bugzilla.netfilter.org/show_bug.cgi?id=1319 Pablo Neira Ayuso <pablo at netfilter.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Pablo Neira Ayuso <pablo at netfilter.org> --- Closing this bug, thanks for testing. -- 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/20200908/ed0eba37/attachment.html>
Reasonably Related Threads
- [Bug 1392] New: nft stalls on EGAIN upon repeatedly flushing and populating a set
- [Bug 1434] New: Usability improvements, enabling creation of complex firewalls
- [Bug 1438] New: nft generates wrong intervals for sets with auto-merge
- [Bug 1330] New: Parse error for importing set with netmask
- [Bug 1325] New: Reproducible NULL ptr deref upon checking trivial nftables ruleset in Linux 5.0