Package: iputils-ping
Version: 3:20180629-2+deb10u1
Severity: wishlist

Dear Maintainer,

This is puzzling: 

  $ telnet fe80::1
   Trying fe80::1...
   telnet: Unable to connect to remote host: Invalid argument
   [ normal behaviour with link-local addresses ]

   schaefer@reliand:~$ telnet -6 fe80::1%eth1
   Trying fe80::1%eth1...
   [also ok: no error, NDP requests sent]

but:

   $ ping6 fe80::1
   PING fe80::1(fe80::1) 56 data bytes
   From fe80::9e8e:99ff:fe3c:5523%eth0: icmp_seq=1 Destination unreachable: 
Address unreachable

Link-local addresses are ambiguous: they lack the scope ID, unless you specify
the scope with a postfix %iface_name or %iface_id. So why does ping try to
guess which interface is used?

That's the only way it should work:

   $ ping6 fe80::1%eth1
   PING fe80::1%eth0(fe80::1%eth1) 56 data bytes

(or with the -I option).

The manpage says:
       -I interface
           interface is either an address, or an interface name. If interface
           is an address, it sets source address to specified interface
           address. If interface in an interface name, it sets source
           interface to specified interface. NOTE: For IPv6, when doing ping
           to a link-local scope address, link specification (by the
           '%'-notation in destination, or by this option) can be used but it
           is *no longer* required.

And yes, that wrong behaviour is new in buster (correct behaviour in stretch or
jessie).  Maybe that changes was upstream and not intentional (could be linked
to other types of non routed v6 addresses), but it is still puzzling.

There is a lot of of code in ping6_common.c that, if device is unset and
getaddrinfo(3) returns a zero scope ID, tries to probe a scope ID. I do not see
why ping should do that.

-- System Information:
Debian Release: 10.7
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-13-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=fr_CH.iso-8859-1 (charmap=ISO-8859-1), LANGUAGE=C 
(charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages iputils-ping depends on:
ii  libc6       2.28-10
ii  libcap2     1:2.25-2
ii  libidn2-0   2.0.5-1+deb10u1
ii  libnettle6  3.4.1-1

Versions of packages iputils-ping recommends:
ii  libcap2-bin  1:2.25-2

iputils-ping suggests no packages.

-- no debconf information

Reply via email to