<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 - When called from nft -f, list counters outputs all zeros"
href="https://bugzilla.netfilter.org/show_bug.cgi?id=1710">1710</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>When called from nft -f, list counters outputs all zeros
</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>x86_64
</td>
</tr>
<tr>
<th>OS</th>
<td>Debian GNU/Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>major
</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>jannh@selfnet.de
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=722" name="attach_722" title="Example file">attachment 722</a> <a href="attachment.cgi?id=722&action=edit" title="Example file">[details]</a></span>
Example file
When adding a counter to a ruleset, the statement "nft list counters" (or "nft
reset counters") can be used to output the counter values. The list counters
statement can also be included into a rule file. When run from a file via "nft
-f", we experienced that all counters were always zero.
The attached file aims to atomically list the counters and then load a new
ruleset. Under Debian bullseye, this was working as expected. The bug appeared
new after the Debian bookworm upgrade.
Steps to reproduce:
1. Load attached file with "nft -f". It will create a simple ruleset with only
one named counter counting all input traffic. It will not make output if the
rules were empty before (list counters shows nothing if there are no counters).
2. Use nft list counters to display the current values. Verify, the counter
values increase (probably send a ping or so to get the counter to increase).
3. Load the attached file again. The list counter statement outputs the
counters, but the values are zero.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>