lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <13b17b8a0908051627n32ce7461j75e8459a2c54909c@mail.gmail.com>
Date:	Wed, 5 Aug 2009 16:27:14 -0700
From:	Michele BOLOGNA <michele.bologna@...il.com>
To:	yoshfuji@...ux-ipv6.org
Cc:	netdev@...r.kernel.org
Subject: strange behaviour in ping when specifying timeout in msec

Dear Mr. Yoshifuji,
I recently noticed a strange behaviour in ping from iputils.

First of all some information:
mbologna@...tune:~$ ping -V
ping utility, iputils-sss20071127

Now, I want to specify a timeout and after it expires I would like
that ping exits, regardless of the packets received, so I use the -W
option:

      -W timeout
              Time to wait for a response, in seconds. The option affects only
              timeout in absense of any responses, otherwise  ping  waits  for
              two RTTs.

So, if I decide to wait 1s for 5 packets, the ping works fine and
exits after 5s:

mbologna@...tune:~$ ping -c 5 -W 1 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.

--- 1.1.1.1 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms

However, if I want to specify a timeout that is less than 1s, the ping
does not exit after 5*0.5 s and keeps staying active (notice the ^C):

mbologna@...tune:~$ ping -c 5 -W 0.5 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
^C
--- 1.1.1.1 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms

I also tried escaping the timeout with \ '' "" and so on, with no luck.
In a few words, is possible to specify a timeout that is less than 1 s?
Where am I wrong?

Thank you very much for your answer.
Best regards,
  Michele Bologna

-- 
Michele BOLOGNA
Email/GTalk: michele.bologna@...il.com
Skype: michele-mb
PGP: 0x0BA55536
Web: www.mb.netsons.org
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ