freebsd-src/sbin/ping
Mike Karels e23a0f521f 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 5af718a592)
2022-05-27 07:11:46 -05:00
..
tests ping: if -S srcaddr uses a numeric address, use that protocol 2022-05-27 07:11:46 -05:00
main.c ping: if -S srcaddr uses a numeric address, use that protocol 2022-05-27 07:11:46 -05:00
main.h ping: fix parsing of options including '4' and '6' 2021-12-12 20:27:12 -05:00
Makefile ping: allow building without INET support 2020-11-28 23:24:19 +00:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Makefile.depend.options Add Makefile.depend.options 2019-12-11 17:37:37 +00:00
ping.8 ping(8): Fix a mandoc related issue 2020-12-19 11:57:47 +00:00
ping.c ping: fix parsing of options including '4' and '6' 2021-12-12 20:27:12 -05:00
ping.h Merge ping6 to ping 2020-11-26 04:29:30 +00:00
ping6.c ping: fix parsing of options including '4' and '6' 2021-12-12 20:27:12 -05:00
ping6.h Merge ping6 to ping 2020-11-26 04:29:30 +00:00
utils.c ping: Move in_cksum() to a separate source file 2019-08-17 15:25:01 +00:00
utils.h ping: fix include guard symbol name to reflect the header file name 2019-08-23 15:24:18 +00:00