All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Nielsen <a.nielsen@shikadi.net>
To: netfilter-devel@vger.kernel.org
Subject: Bug: iptables -L and -Z at the same time now refuses other options
Date: Wed, 23 Apr 2025 11:08:12 +1000	[thread overview]
Message-ID: <20250423110812.61e2ecf0@gnosticus> (raw)

Hi all,

I don't have a Bugzilla account so would someone mind logging this bug
for me?

I just updated iptables and now this command fails:

  $ iptables -L -v -n -x -Z
  iptables v1.8.11 (legacy): Illegal option `--numeric' with this command

The manpage says that it is valid to use -Z with -L, which displays the
values before zeroing them.  However the latest iptables release doesn't
allow you to specify -n if you are including -Z, which means if you
want to display AND zero the counters at the same time, you can't have
the raw numeric values shown.

It works fine if you omit -Z but then you end up losing precision,
having to run two commands (one to show the counters and then another
one to zero them, with any change in the counters occurring between the
two commands lost).

If you remove the -n option, it then also complains about -x:

  $ iptables -L -v -x -Z
  iptables v1.8.11 (legacy): Illegal option `--exact' with this command

This used to work so hopefully it's a small bug that can be easily
fixed.  It looks like while -L and -Z are still permitted at the same
time, most of the options for -L are now being incorrectly refused if -Z
is also specified.

Many thanks,
Adam.

(Not subscribed, please CC)

                 reply	other threads:[~2025-04-23  1:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250423110812.61e2ecf0@gnosticus \
    --to=a.nielsen@shikadi.net \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.