netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Marangi <ansuelsmth@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Shuah Khan <shuah@kernel.org>, Petr Machata <petrm@nvidia.com>,
	Benjamin Poirier <bpoirier@nvidia.com>,
	Hangbin Liu <liuhangbin@gmail.com>, Jiri Pirko <jiri@resnulli.us>,
	Ido Schimmel <idosch@nvidia.com>,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [net PATCH 1/2] selftests: net: lib: fix broken ping with coreutils ping util
Date: Mon, 2 Dec 2024 21:39:15 +0100	[thread overview]
Message-ID: <674e1af7.050a0220.3799ad.fa5e@mx.google.com> (raw)
In-Reply-To: <20241130154840.lv4rmor4dv66cctf@skbuf>

On Sat, Nov 30, 2024 at 05:48:40PM +0200, Vladimir Oltean wrote:
> On Sat, Nov 30, 2024 at 04:46:14PM +0100, Christian Marangi wrote:
> > On Sat, Nov 30, 2024 at 05:43:07PM +0200, Vladimir Oltean wrote:
> > > On Sat, Nov 30, 2024 at 12:33:09PM +0100, Christian Marangi wrote:
> > > > If the coreutils variant of ping is used instead of the busybox one, the
> > > > ping_do() command is broken. This comes by the fact that for coreutils
> > > > ping, the ping IP needs to be the very last elements.
> > > > 
> > > > To handle this, reorder the ping args and make $dip last element.
> > > > 
> > > > The use of coreutils ping might be useful for case where busybox is not
> > > > compiled with float interval support and ping command doesn't support
> > > > 0.1 interval. (in such case a dedicated ping utility is installed
> > > > instead)
> > > > 
> > > > Cc: stable@vger.kernel.org
> > > > Fixes: 73bae6736b6b ("selftests: forwarding: Add initial testing framework")
> > > > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> > > > ---
> > > 
> > > Do you mean the other way around? that the busybox ping is the broken one?
> > > And by coreutils ping, you actually mean iputils ping, right?
> > 
> > Mhh no busybox ping utility is problematic only if FLOAT INTERVAL is not
> > enabled (aka 0.1 interval are not supported)
> > 
> > Yes I'm referring to iputils ping. With that I notice args are wrongly
> > parsed... especially with the -c option.
> 
> But isn't iputils ping what everybody else uses? I'm confused. I have
> this version and the current syntax is not problematic for me.
> 
> $ ping -V
> ping from iputils 20240905
> libcap: yes, IDN: yes, NLS: no, error.h: yes, getrandom(): yes, __fpending(): yes

Mhh the problem seems to be -c 

Let me post some outputs...

root@OpenWrt:~# ping -V
ping from iputils 20240117
libcap: no, IDN: no, NLS: no, error.h: no, getrandom(): yes, __fpending(): yes
root@OpenWrt:~# ping -c 10 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.102 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.084 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.236 ms
^C
--- 192.168.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2080ms
rtt min/avg/max/mdev = 0.084/0.140/0.236/0.067 ms
root@OpenWrt:~# ping 192.168.1.1 -c 10
ping: -c: Name does not resolve

As you can see swapping the ip cause this "Name does not resolve" error.

-- 
	Ansuel

  reply	other threads:[~2024-12-02 20:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-30 11:33 [net PATCH 1/2] selftests: net: lib: fix broken ping with coreutils ping util Christian Marangi
2024-11-30 11:33 ` [net PATCH 2/2] selftests: forwarding: local_termination: sleep before starting tests Christian Marangi
2024-12-02 11:52   ` Vladimir Oltean
2024-11-30 15:43 ` [net PATCH 1/2] selftests: net: lib: fix broken ping with coreutils ping util Vladimir Oltean
2024-11-30 15:46   ` Christian Marangi
2024-11-30 15:48     ` Vladimir Oltean
2024-12-02 20:39       ` Christian Marangi [this message]
2024-12-02 21:24         ` Vladimir Oltean
2024-12-02 21:28           ` Christian Marangi
2024-12-02 21:29             ` Christian Marangi
2024-12-03 11:46               ` Vladimir Oltean

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=674e1af7.050a0220.3799ad.fa5e@mx.google.com \
    --to=ansuelsmth@gmail.com \
    --cc=bpoirier@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=idosch@nvidia.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=shuah@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vladimir.oltean@nxp.com \
    /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).