MFC r351318, r351330, r351393, r351398, r351440, r351461, r351548, r352226, r352229r351318:ping: Add tests of the Internet checksum functionSubmitted by: Ján Sučan <[email protected]>Sponsored
MFC r351318, r351330, r351393, r351398, r351440, r351461, r351548, r352226, r352229r351318:ping: Add tests of the Internet checksum functionSubmitted by: Ján Sučan <[email protected]>Sponsored by: Google LLC (Google Summer of Code 2019)Differential Revision: https://reviews.freebsd.org/D21340r351330:ping: do reverse DNS lookup of the target addressWhen printing replies, ping will now attempt a reverse DNS lookup of thetarget. That can be suppressed by using the "-n" option. Curiously, pinghas always done reverse lookups in certain error paths, but never in thesuccess path.Submitted by: Ján Sučan <[email protected]>Sponsored by: Google LLC (Google Summer of Code 2019)Differential Revision: https://reviews.freebsd.org/D21351r351393:ping: add a basic functional testSubmitted by: Ján Sučan <[email protected]>Sponsored by: Google, inc. (Google Summer of Code 2019)Differential Revision: https://reviews.freebsd.org/D21289r351398:ping: By default, don't reverse lookup IP addressesping's default is now not to attempt reverse DNS lookups. The -H flag willenable them. This change is not quite a reversion of r351330. That changemade the happy path and error path do reverse lookups consistently; thischange changes the default for both paths.Submitted by: Ján Sučan <[email protected]>Discussed with: cemMFC-With: 351330Sponsored by: Google LLC (Google Summer of Code 2019)Differential Revision: https://reviews.freebsd.org/D21364r351440:ping: Fix alignment errorsThis fixes -Wcast-align errors when compiled with WARNS=6.Submitted by: Ján Sučan <[email protected]>Sponsored by: Google LLC (Google Summer of Code 2019)Differential Revision: https://reviews.freebsd.org/D21327r351461:ping: fix unaligned access to ancillary dataUse CMSG_FIRSTHDR rather than assume that an array is correctly aligned.Fixes warnings on sparc64 and powerpcspe.Submitted by: Ján Sučan <[email protected]>MFH: 2 weeksSponsored by: Google LLC (Google Summer of Code 2019)Differential Revision: https://reviews.freebsd.org/D21406r351548:ping: raise WARNS level to 6Submitted by: Ján Sučan <[email protected]>Sponsored by: Google LLC (Google Summer of Code 2019)Differential Revision: https://reviews.freebsd.org/D21405r352226:ping: fix a string in an error messager352229:ping: Verify whether a datagram timestamp was actually received.ping(8) uses SO_TIMESTAMP, which attaches a timestamp to each IP datagram atthe 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 tryingto read it. This fixes segfaults that can happen when the kernel doesn'tattach a timestamp.The bug has always existed, but prior to r351461 it manifested as animplausible round-trip-time, not a segfault.Reported by: phoMFC-With: 351461
show more ...