<html>
<head>
<base href="https://bugzilla.netfilter.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:public_timo.s@silentcreek.de" title="Timo Sigurdsson <public_timo.s@silentcreek.de>"> <span class="fn">Timo Sigurdsson</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - flush set doesn't work as expected in script"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1431">bug 1431</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>public_timo.s@silentcreek.de
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - flush set doesn't work as expected in script"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1431#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - flush set doesn't work as expected in script"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1431">bug 1431</a>
from <span class="vcard"><a class="email" href="mailto:public_timo.s@silentcreek.de" title="Timo Sigurdsson <public_timo.s@silentcreek.de>"> <span class="fn">Timo Sigurdsson</span></a>
</span></b>
<pre>I can confirm this is an issue. And it's actually more than just a usability
issue, it is a bug because it breaks atomicity when trying to update/reload a
set.
My test case is very simple. Assume the following set:
`nft add set inet filter testset { type ipv4_addr; flags interval; }'
Now create a script file a.nft with the following content:
flush set inet filter testset
add element inet filter testset { 192.168.0.0/16 }
Load the file with `nft -f a.nft' and it will work just fine.
Now create a second script file b.nft with the following content:
flush set inet filter testset
add element inet filter testset { 192.168.0.0/16, 172.16.0.0/12 }
Load the new file with `nft -f b.nft' and it will also just be fine.
But now take this example c.nft:
flush set inet filter testset
add element inet filter testset { 192.168.0.0/24, 172.16.0.0/12 }
Trying to run `nft -f c.nft' will result in the error:
Interval overlaps with an existing one
Summing up: While you can reload an existing set if it's unchanged, or with
added or removed elements, you cannot reload a set where the extent of an
interval is changed!</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>