[Bug 1972897] [NEW] redirect seen as error

Martijn Lievaart 1972897 at bugs.launchpad.net
Tue May 10 19:40:54 UTC 2022


Public bug reported:

NOTE: this bug report is for the package iputils-ping, but the website did not let me enter that:
$ dpkg-query -S /bin/ping
iputils-ping: /bin/ping
$ dpkg-query -l iputils-ping
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-===============================================
ii  iputils-ping   3:20211215-1 amd64        Tools to test the reachability of network hosts
$

This is on 22.04 (Jammy Jellyfish), but the bug is also present in 20.04
(Focal Fossa)


The deadline option is documented to exit on receiving an ICMP error:

       -w deadline
           Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this case ping does not stop after count packet are sent, it waits
           either for deadline expire or until count probes are answered or for some error notification from network.

However, it exits too when a redirect is received, which is not an
error. This make it useless for liveness probes when a redirect occurs.


$ ping -w 2 strange.soleus.nu
PING strange.soleus.nu (94.142.246.148) 56(84) bytes of data.
>From hv02.rtij.nl (10.0.2.4) icmp_seq=1 Redirect Host(New nexthop: lte.rtij.nl (10.0.0.137))

--- strange.soleus.nu ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
$

Note that the -c <n> option suffers from the same problem.

This does not happen in 18.04 (Bionic Beaver), which shows the expected
behaviour:

martijn at popeye:~$ ping -w 2 strange.soleus.nu
PING strange.soleus.nu (94.142.246.148) 56(84) bytes of data.
>From hv02.rtij.nl (10.0.2.4): icmp_seq=1 Redirect Host(New nexthop: lte.rtij.nl (10.0.0.137))
64 bytes from strange.soleus.nu (94.142.246.148): icmp_seq=1 ttl=53 time=47.9 ms

--- strange.soleus.nu ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 47.908/47.908/47.908/0.000 ms
martijn at popeye:~$ grep VERSION /etc/os-release
VERSION="18.04.6 LTS (Bionic Beaver)"
VERSION_ID="18.04"
VERSION_CODENAME=bionic
martijn at popeye:~$ dpkg-query -S /bin/ping
iputils-ping: /bin/ping
martijn at popeye:~$

** Affects: iputils (Ubuntu)
     Importance: Undecided
         Status: New

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

Title:
  redirect seen as error

Status in iputils package in Ubuntu:
  New

Bug description:
  NOTE: this bug report is for the package iputils-ping, but the website did not let me enter that:
  $ dpkg-query -S /bin/ping
  iputils-ping: /bin/ping
  $ dpkg-query -l iputils-ping
  Desired=Unknown/Install/Remove/Purge/Hold
  | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
  |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
  ||/ Name           Version      Architecture Description
  +++-==============-============-============-===============================================
  ii  iputils-ping   3:20211215-1 amd64        Tools to test the reachability of network hosts
  $

  This is on 22.04 (Jammy Jellyfish), but the bug is also present in
  20.04 (Focal Fossa)

  
  The deadline option is documented to exit on receiving an ICMP error:

         -w deadline
             Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this case ping does not stop after count packet are sent, it waits
             either for deadline expire or until count probes are answered or for some error notification from network.

  However, it exits too when a redirect is received, which is not an
  error. This make it useless for liveness probes when a redirect
  occurs.

  
  $ ping -w 2 strange.soleus.nu
  PING strange.soleus.nu (94.142.246.148) 56(84) bytes of data.
  From hv02.rtij.nl (10.0.2.4) icmp_seq=1 Redirect Host(New nexthop: lte.rtij.nl (10.0.0.137))

  --- strange.soleus.nu ping statistics ---
  1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
  $

  Note that the -c <n> option suffers from the same problem.

  This does not happen in 18.04 (Bionic Beaver), which shows the
  expected behaviour:

  martijn at popeye:~$ ping -w 2 strange.soleus.nu
  PING strange.soleus.nu (94.142.246.148) 56(84) bytes of data.
  From hv02.rtij.nl (10.0.2.4): icmp_seq=1 Redirect Host(New nexthop: lte.rtij.nl (10.0.0.137))
  64 bytes from strange.soleus.nu (94.142.246.148): icmp_seq=1 ttl=53 time=47.9 ms

  --- strange.soleus.nu ping statistics ---
  1 packets transmitted, 1 received, 0% packet loss, time 0ms
  rtt min/avg/max/mdev = 47.908/47.908/47.908/0.000 ms
  martijn at popeye:~$ grep VERSION /etc/os-release
  VERSION="18.04.6 LTS (Bionic Beaver)"
  VERSION_ID="18.04"
  VERSION_CODENAME=bionic
  martijn at popeye:~$ dpkg-query -S /bin/ping
  iputils-ping: /bin/ping
  martijn at popeye:~$

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




More information about the foundations-bugs mailing list