This is now fixed in Trusty (/upstream):

dc@darkcharl:~$ time ping -c 3 -w 10 1.2.3.4
PING 1.2.3.4 (1.2.3.4) 56(84) bytes of data.

--- 1.2.3.4 ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 9071ms


real    0m10.004s
user    0m0.001s
sys     0m0.004s


** Changed in: iputils (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to iputils in Ubuntu.
https://bugs.launchpad.net/bugs/1002037

Title:
  iputils' ping seems to ignore the deadline (-w) setting

Status in “iputils” package in Ubuntu:
  Fix Released

Bug description:
  I came across this when I attempted to ping an unavailable host and
  specified a deadline for my test.  Spite the deadline setting, ping
  didn't time out after specified time. However, it appears that -w is
  ignored also for available hosts.

  
  Examples:

  [Unavailable host]

  dc@dc:~$ time ping -c 3 -w 10 1.2.3.4
  PING 1.2.3.4 (1.2.3.4) 56(84) bytes of data.
  ^C
  --- 1.2.3.4 ping statistics ---
  89 packets transmitted, 0 received, 100% packet loss, time 88238ms

  
  real  1m28.599s
  user  0m0.000s
  sys   0m0.020s


  [Available host]

  dc@dc:~$ time ping -c 100 -w 3 192.168.1.254 
  PING 192.168.1.254 (192.168.1.254) 56(84) bytes of data.
  64 bytes from 192.168.1.254: icmp_req=1 ttl=64 time=14.8 ms
  64 bytes from 192.168.1.254: icmp_req=2 ttl=64 time=6.75 ms
  64 bytes from 192.168.1.254: icmp_req=3 ttl=64 time=10.7 ms
  64 bytes from 192.168.1.254: icmp_req=4 ttl=64 time=6.97 ms
  64 bytes from 192.168.1.254: icmp_req=5 ttl=64 time=9.65 ms
  64 bytes from 192.168.1.254: icmp_req=6 ttl=64 time=7.69 ms
  64 bytes from 192.168.1.254: icmp_req=7 ttl=64 time=4.22 ms
  64 bytes from 192.168.1.254: icmp_req=8 ttl=64 time=7.10 ms
  64 bytes from 192.168.1.254: icmp_req=9 ttl=64 time=9.33 ms
  64 bytes from 192.168.1.254: icmp_req=10 ttl=64 time=6.59 ms
  64 bytes from 192.168.1.254: icmp_req=11 ttl=64 time=12.1 ms
  64 bytes from 192.168.1.254: icmp_req=12 ttl=64 time=5.80 ms
  ^C
  --- 192.168.1.254 ping statistics ---
  12 packets transmitted, 12 received, 0% packet loss, time 11026ms
  rtt min/avg/max/mdev = 4.224/8.488/14.836/2.851 ms

  real  0m11.172s
  user  0m0.000s
  sys   0m0.004s

  
  The older version of iputils' (20020927) ping behaves as expected.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: iputils-ping 3:20101006-1ubuntu1
  ProcVersionSignature: Ubuntu 3.2.0-24.38-generic 3.2.16
  Uname: Linux 3.2.0-24-generic i686
  ApportVersion: 2.0.1-0ubuntu7
  Architecture: i386
  Date: Sun May 20 15:16:57 2012
  EcryptfsInUse: Yes
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427)
  ProcEnviron:
   TERM=xterm
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: iputils
  UpgradeStatus: Upgraded to precise on 2012-04-27 (22 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/iputils/+bug/1002037/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to