#560·gping

gping fails on IPv6: tries non-existent ping6 instead of ping -6

Author: sedlundCreated Feb 1, 2026Updated Jun 17, 2026

Describe the bug

gping fails to ping IPv6 addresses on systems using modern iputils, because it tries to execute a separate ping6 binary which no longer exists.
This results in:

Error: Error spawning ping: No such file or directory (os error 2)

Even when a capable dual-stack ping from iputils is in $PATH (successfully probed via ping -V), gping does not fall back to using ping -6.

To Reproduce

bash
gping 2620:fe::fe
# or
gping -6 2620:fe::fe

Strace shows:

  • Successful ping -V probe (detects iputils)
  • Then attempts .../bin/ping6 → ENOENT
  • Searches other locations for ping6 → all fail
  • Exits with os error 2

Expected behavior

gping should use ping -6 for IPv6 targets when a modern dual-stack ping (iputils) is available, or fall back to it if ping6 is not found.

Additional context

  • iputils removed the separate ping6 binary in 2015 (version s20150815):
    https://github.com/iputils/iputils/pull/31
    Quote: "As of version s20150815, the ping6 binary doesn't exist anymore."
  • gping already requires iputils (rejects inetutils/BusyBox)
  • Some recent PRs (e.g. #546) moves toward ping -6, which would fix this.

Suggested fix

Update the pinger logic to:

  1. Try ping6 if it exists (legacy support)
  2. Otherwise use ping -6 when iputils is detected

Thanks for the great tool! This small change would make IPv6 work out-of-the-box on current Linux systems with iputils.