orf / orf/gping

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

Open
#560 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
12.7k
Forks
366
Avg merge
7d 7h
Merged PRs (30d)
1

Description

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
  • 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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the pinger logic and the approach referenced in PR #546. Reproduce the issue with gping 2620:fe::fe and gping -6 2620:fe::fe; done means IPv6 uses ping6 when available or falls back to ping -6 with modern iputils.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust
Domain
cli, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.