[Bug 1734] New: nft set with auto-merge json import/export
bugzilla-daemon at netfilter.org
bugzilla-daemon at netfilter.org
Mon Jan 29 18:38:56 CET 2024
https://bugzilla.netfilter.org/show_bug.cgi?id=1734
Bug ID: 1734
Summary: nft set with auto-merge json import/export
Product: nftables
Version: 1.0.x
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P5
Component: nft
Assignee: pablo at netfilter.org
Reporter: apex at xepa.nl
Hi there,
I would like to report a bug with the nft ecosystem pertaining to the
auto-merge setting during the export / import in the JSON format for a set.
Example:
# nft 'add set inet filter myset { type ipv4_addr; flags interval; auto-merge
}'
# nft 'list set inet filter myset'
table inet filter {
set myset {
type ipv4_addr
flags interval
auto-merge
}
}
# nft --json 'list set inet filter myset' | jq '.nftables[1]'
{
"set": {
"family": "inet",
"name": "myset",
"table": "filter",
"type": "ipv4_addr",
"handle": 2,
"flags": [
"interval"
]
}
}
// export all in json format
# nft --json 'list set inet filter myset' > ./myset.json
// delete myset
# nft 'delete set inet filter myset'
// show it
# nft 'list set inet filter myset'
Error: No such file or directory
list set inet filter myset
// import set again
# nft --json --file ./myset.json
// list set again
# nft 'list set inet filter myset'
table inet filter {
set myset {
type ipv4_addr
flags interval
elements = { 192.168.0.0/24 }
}
}
Notice that the auto-merge setting is gone.
--
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/20240129/835ea137/attachment.html>
More information about the netfilter-buglog
mailing list