<html>
<head>
<base href="https://bugzilla.netfilter.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - nft set with auto-merge json import/export"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1734">1734</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>nft set with auto-merge json import/export
</td>
</tr>
<tr>
<th>Product</th>
<td>nftables
</td>
</tr>
<tr>
<th>Version</th>
<td>1.0.x
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>minor
</td>
</tr>
<tr>
<th>Priority</th>
<td>P5
</td>
</tr>
<tr>
<th>Component</th>
<td>nft
</td>
</tr>
<tr>
<th>Assignee</th>
<td>pablo@netfilter.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>apex@xepa.nl
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>