1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00
freebsd/sbin/ping
Alan Somers b17fb99228 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 after:	3 days
MFC-With:	351461
2019-09-11 18:54:45 +00:00
..
tests ping: By default, don't reverse lookup IP addresses 2019-08-22 18:57:24 +00:00
Makefile ping: raise WARNS level to 6 2019-08-27 15:34:37 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
ping.8 ping: By default, don't reverse lookup IP addresses 2019-08-22 18:57:24 +00:00
ping.c ping: Verify whether a datagram timestamp was actually received. 2019-09-11 18:54:45 +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