netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: netfilter-devel@vger.kernel.org
Subject: [iptables PATCH 3/3] tests: libipt_icmp.t: Enable tests with numeric output
Date: Wed,  2 Aug 2023 04:05:47 +0200	[thread overview]
Message-ID: <20230802020547.28886-3-phil@nwl.cc> (raw)
In-Reply-To: <20230802020547.28886-1-phil@nwl.cc>

Unrelated to the question whether numeric (save) output is desired or
not, enable the tests and expect the known format.

Using --list without --numeric prints the names, BTW.

Fixes: 49d5b7277c7f2 ("extensions: libipt_icmp: add unit test")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 extensions/libipt_icmp.t | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/extensions/libipt_icmp.t b/extensions/libipt_icmp.t
index 08692900dba12..3c97cf4e06128 100644
--- a/extensions/libipt_icmp.t
+++ b/extensions/libipt_icmp.t
@@ -1,11 +1,8 @@
 :INPUT,FORWARD,OUTPUT
 -p icmp -m icmp --icmp-type any;=;OK
-# output uses the number, better use the name?
-# ERROR: cannot find: iptables -I INPUT -p icmp -m icmp --icmp-type echo-reply
-# -p icmp -m icmp --icmp-type echo-reply;=;OK
-# output uses the number, better use the name?
-# ERROR: annot find: iptables -I INPUT -p icmp -m icmp --icmp-type destination-unreachable
-# -p icmp -m icmp --icmp-type destination-unreachable;=;OK
+# XXX: output uses the number, better use the name?
+-p icmp -m icmp --icmp-type echo-reply;-p icmp -m icmp --icmp-type 0;OK
+-p icmp -m icmp --icmp-type destination-unreachable;-p icmp -m icmp --icmp-type 3;OK
 # it does not acccept name/name, should we accept this?
 # ERROR: cannot load: iptables -A INPUT -p icmp -m icmp --icmp-type destination-unreachable/network-unreachable
 # -p icmp -m icmp --icmp-type destination-unreachable/network-unreachable;=;OK
-- 
2.40.0


  parent reply	other threads:[~2023-08-02  2:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02  2:05 [iptables PATCH 1/3] extensions: libipt_icmp: Fix confusion between 255/255 and any Phil Sutter
2023-08-02  2:05 ` [iptables PATCH 2/3] extensions: libipt_icmp: --icmp-type is not mandatory Phil Sutter
2023-08-02  2:05 ` Phil Sutter [this message]
2023-08-02  8:31 ` [iptables PATCH 1/3] extensions: libipt_icmp: Fix confusion between 255/255 and any Jan Engelhardt
2023-08-03 12:57   ` Phil Sutter
2023-08-03 19:38     ` Jan Engelhardt
2023-08-04 13:56       ` Phil Sutter

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=20230802020547.28886-3-phil@nwl.cc \
    --to=phil@nwl.cc \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).