]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r351318, r351330, r351393, r351398, r351440, r351461, r351548, r352226, r352229
authorAlan Somers <asomers@FreeBSD.org>
Mon, 16 Sep 2019 00:56:33 +0000 (00:56 +0000)
committerAlan Somers <asomers@FreeBSD.org>
Mon, 16 Sep 2019 00:56:33 +0000 (00:56 +0000)
commite88291e3875fbbada978b1e95758b101195b918d
tree6616fbd58bf26356e42904311b3129fa2b7223dc
parenta2ec7d0f30bb121875f1581971a8251738975638
MFC r351318, r351330, r351393, r351398, r351440, r351461, r351548, r352226, r352229

r351318:
ping: Add tests of the Internet checksum function

Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google LLC (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21340

r351330:
ping: do reverse DNS lookup of the target address

When printing replies, ping will now attempt a reverse DNS lookup of the
target.  That can be suppressed by using the "-n" option.  Curiously, ping
has always done reverse lookups in certain error paths, but never in the
success path.

Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google LLC (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21351

r351393:
ping: add a basic functional test

Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google, inc. (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21289

r351398:
ping: By default, don't reverse lookup IP addresses

ping's default is now not to attempt reverse DNS lookups.  The -H flag will
enable them.  This change is not quite a reversion of r351330.  That change
made the happy path and error path do reverse lookups consistently; this
change changes the default for both paths.

Submitted by: Ján Sučan <sucanjan@gmail.com>
Discussed with: cem
MFC-With: 351330
Sponsored by: Google LLC (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21364

r351440:
ping: Fix alignment errors

This fixes -Wcast-align errors when compiled with WARNS=6.

Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google LLC (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21327

r351461:
ping: fix unaligned access to ancillary data

Use CMSG_FIRSTHDR rather than assume that an array is correctly aligned.
Fixes warnings on sparc64 and powerpcspe.

Submitted by: Ján Sučan <sucanjan@gmail.com>
MFH: 2 weeks
Sponsored by: Google LLC (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21406

r351548:
ping: raise WARNS level to 6

Submitted by: Ján Sučan <sucanjan@gmail.com>
Sponsored by: Google LLC (Google Summer of Code 2019)
Differential Revision: https://reviews.freebsd.org/D21405

r352226:
ping: fix a string in an error message

r352229:
ping: Verify whether a datagram timestamp was actually received.

ping(8) uses SO_TIMESTAMP, which attaches a timestamp to each IP datagram at
the time it's received by the kernel.  Except that occasionally it doesn't.
Add a check to see whether such a timestamp was actually set before trying
to read it.  This fixes segfaults that can happen when the kernel doesn't
attach a timestamp.

The bug has always existed, but prior to r351461 it manifested as an
implausible round-trip-time, not a segfault.

Reported by: pho
MFC-With: 351461
etc/mtree/BSD.tests.dist
sbin/ping/Makefile
sbin/ping/ping.8
sbin/ping/ping.c
sbin/ping/tests/Makefile [new file with mode: 0644]
sbin/ping/tests/in_cksum_test.c [new file with mode: 0644]
sbin/ping/tests/ping_c1_s56_t1.out [new file with mode: 0644]
sbin/ping/tests/ping_test.sh [new file with mode: 0644]