Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add IPv6 ping support, fixes #43 #61

Merged
merged 1 commit into from
Feb 6, 2022
Merged

Conversation

highvolt-dev
Copy link
Owner

No description provided.

if ping_6:
if is_osx:
ping_bin = 'ping6'
else:
Copy link
Contributor

@hugoh hugoh Feb 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@highvolt-dev - this test does not work all the time on Linux. For example, on OpenWrt, there are 2 distinct binaries: ping for IPv4, and ping6 for IPv6. ping -6 is not a valid option:

# opkg list iputils-ping\*
iputils-ping - 20101006-1 - Program ping from iputils.
 Sends ICMP ECHO_REQUEST to network hosts (IPv4).
iputils-ping6 - 20101006-1 - Program ping6 from iputils.
 Sends ICMP ECHO_REQUEST to network hosts (IPv6).
# ping 
Usage: ping [-LRUbdfnqrvVaAD] [-c count] [-i interval] [-w deadline]
            [-p pattern] [-s packetsize] [-t ttl] [-I interface]
            [-M pmtudisc-hint] [-m mark] [-S sndbuf]
            [-T tstamp-options] [-Q tos] [hop1 ...] destination
# opkg files iputils-ping6
Package iputils-ping6 (20101006-1) is installed on root and has the following files:
/usr/bin/ping6

A better test may be to test for a ping6 binary and fall back to ping -6.

Copy link
Contributor

@hugoh hugoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid it doesn't work on OpenWrt 19.07.7. See my comment about ping -6 vs ping6.

@highvolt-dev
Copy link
Owner Author

Thanks for testing, @hugoh
My OpenWRT based openmptcprouter install was able to use the -6 flag. I'll check for the IPv6 binary and reopen #43 in the meantime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants