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
..
2019-09-11 13:27:10 +00:00
2019-08-13 20:06:55 +00:00
2019-02-04 21:28:25 +00:00
2019-05-23 20:12:24 +00:00
2019-08-13 20:06:55 +00:00
2019-03-08 10:03:16 +00:00
2019-08-05 00:08:25 +00:00
2019-08-08 20:56:52 +00:00
2017-10-31 00:07:04 +00:00
2019-01-05 16:05:39 +00:00
2019-08-13 20:06:55 +00:00
2019-06-25 04:50:09 +00:00