HomeFreeBSD

ping: if -S srcaddr uses a numeric address, use that protocol

Description

ping: if -S srcaddr uses a numeric address, use that protocol

The command "ping -S dotted.quad hostname" fails on dual-stack hosts
with the confusing message "ping: invalid source address: Name does
not resolve" because IPv6 is selected in preference. If the argument
to -S is numeric (likely), select the corresponding address family,
as if -4 or -6 was specified. Add tests that either IPv4 or IPv6 can
be forced via a -S parameter.

Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D35271

(cherry picked from commit 5af718a5927a9e078201ebc7ad1310e5b4918b7a)

Details

Provenance
karelsAuthored on May 20 2022, 2:16 PM
Reviewer
asomers
Differential Revision
D35271: ping: if -S srcaddr uses a numeric address, use that protocol
Parents
rGe5b204542f33: makefs: Remove execute permission from in-tree test scripts
Branches
Unknown
Tags
Unknown