close
Skip to content

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

@sedlund

Description

@sedlund

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

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions