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

wgengine/netstack: use ping6 on BSD platforms #8227

Merged
merged 1 commit into from
May 28, 2023
Merged

Conversation

DentonGentry
Copy link
Contributor

Various BSD-derived operating systems including macOS and FreeBSD require that ping6 be used for IPv6 destinations. The "ping" command does not understand an IPv6 destination.

FreeBSD 13.x and later do handle IPv6 in the regular ping command, but also retain a ping6 command. We use ping6 on all versions of FreeBSD.

Fixes #8225

Various BSD-derived operating systems including macOS and FreeBSD
require that ping6 be used for IPv6 destinations. The "ping" command
does not understand an IPv6 destination.

FreeBSD 13.x and later do handle IPv6 in the regular ping command,
but also retain a ping6 command. We use ping6 on all versions of
FreeBSD.

Fixes #8225

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
Copy link
Member

@bradfitz bradfitz left a comment

Choose a reason for hiding this comment

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

Assuming macOS has ping6, LGTM

@DentonGentry
Copy link
Contributor Author

It does, and it requires that ping6 be used for IPv6.

dgentry@Dentons-Air % ping fe80::8894:c5ff:fe2f:c96%en0
ping: cannot resolve fe80::8894:c5ff:fe2f:c96%en0: Unknown host

dgentry@Dentons-Air % ping6 fe80::8894:c5ff:fe2f:c96%en0
PING6(56=40+8+8 bytes) fe80::1cab:ee19:2d4b:bf3%en0 --> fe80::8894:c5ff:fe2f:c96%en0
16 bytes from fe80::8894:c5ff:fe2f:c96%en0, icmp_seq=0 hlim=64 time=6.779 ms
16 bytes from fe80::8894:c5ff:fe2f:c96%en0, icmp_seq=1 hlim=64 time=14.264 ms

@DentonGentry DentonGentry merged commit 399a807 into main May 28, 2023
35 checks passed
@DentonGentry DentonGentry deleted the dgentry-ping6 branch May 28, 2023 16:50
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.

userPing incorrectly uses ping on BSD for ipv6 addresses
2 participants