Package: iputils / 3:20180629-2+deb10u1


Package Version Patches format
iputils 3:20180629-2+deb10u1 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
set_buildflags | (download)

Makefile | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 pass the debian_ldflags environment variable to the linker
ping fix main loop over multiple addrinfo results.patch | (download)

ping.c | 6 5 + 1 - 0 !
ping6_common.c | 1 1 + 0 - 0 !
2 files changed, 6 insertions(+), 1 deletion(-)

 [patch 1/2] ping: fix main loop over multiple addrinfo results

Despite what the log of commit f68eec0eafad ("ping: perform dual-stack ping
by default") says, main() was not designed to loop over multiple addresses
returned by getaddrinfo().  This is apparent because until commit
db11bc96a68c ("ping: make command to return from main()"), ping{4,6}_run()
never returned (they always exited).  After commit db11bc96a68c, we
encounter unexpected situations if getaddrinfo returns multiple results and
ping{4,6}_run() return != 0.

For example (notice echo reply is not received):

    root@vsid:/src/iputils# ./builddir/ping/ping -w1
    PING (2404:6800:4004:80c::200e)) 56 data bytes

ping try next addrinfo on connect failure.patch | (download)

ping.c | 3 3 + 0 - 0 !
ping6_common.c | 4 4 + 0 - 0 !
2 files changed, 7 insertions(+)

 [patch 2/2] ping: try next addrinfo on connect failure
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

On hosts that have routing rules matching on the outgoing interface [1],
getaddrinfo() may return results sorted in a suboptimal order because it is
not aware of the network interface passed to ping via the "-I" option.  In
particular, address reachability detection may fail and getaddrinfo() will
return ipv6 results first, even though the only routes available are ipv4.

Improve user experience by trying next addrinfo entry if we encounter a
failure at connect() time because of missing or unreachable routes.

[1] For example, on switches running Cumulus Linux, the default VRF is used
for front ports and a "mgmt" VRF is used for the management interface, which