<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 reset counters" does not respect -j option for JSON output"
   href="https://bugzilla.netfilter.org/show_bug.cgi?id=1336">1336</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"nft reset counters" does not respect -j option for JSON output
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>nftables
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86_64
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </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>fox.wilson@cyburity.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When I run a command like "nft -j list counters", I can see counter output in
JSON format. However, "nft reset counters" does not respect the -j option: it
gives output in this format regardless of whether or not the -j option is
passed:

table ... {
    counter ... {
        packets ... bytes ...
    }
}

I would like to be able to atomically reset counters, but get output in JSON
format (otherwise "nft -j list counters; nft reset counters > /dev/null" would
work for me).

This is on Debian buster, with:

~# nft -v
nftables v0.9.0 (Fearless Fosdick)

Thanks!</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>