aboutsummaryrefslogtreecommitdiff
path: root/gnu/lib/libreadline/readline/doc/(developers-only)
diff options
context:
space:
mode:
authorMaxim Konovalov <maxim@FreeBSD.org>2026-05-01 17:45:27 +0000
committerMaxim Konovalov <maxim@FreeBSD.org>2026-05-02 03:16:55 +0000
commit069681afd58a711eb7407be4a9c9a05f787d250f (patch)
tree7b11889fbf99de5441b558e33fa5e4f384d431c3 /gnu/lib/libreadline/readline/doc/(developers-only)
parentc4f08d46c7f717cc8c66bf702c006765a5b6b1a9 (diff)
ping: use CLOCK_REALTIME for ICMP Originate TimestampHEADmain
RFC 792 defines the ICMP Originate Timestamp field as milliseconds since midnight UTC. However, ping(8) currently derives this value from CLOCK_MONOTONIC, which represents time since an unspecified starting point and is not related to UTC. The issue was introduced by commit 1ad76f1b6047, which replaced gettimeofday(2) with clock_gettime(CLOCK_MONOTONIC) for timekeeping in ping(8). Fix this by using CLOCK_REALTIME when generating the ICMP originate timestamp. Before: $ ping -Mt -c1 127.0.0.1 ICMP_TSTAMP PING 127.0.0.1 (127.0.0.1): 56 data bytes <...> time=0.061 ms tso=16:50:31 tsr=17:38:28 tst=17:38:28 (note the tso is off) After: $ ping -Mt -c1 127.0.0.1 ICMP_TSTAMP PING 127.0.0.1 (127.0.0.1): 56 data bytes <...> time=0.038 ms tso=17:42:09 tsr=17:42:09 tst=17:42:09 Reviewed by: asomers, glebius Fixes: 1ad76f1b6047 MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D56759
Diffstat (limited to 'gnu/lib/libreadline/readline/doc/(developers-only)')
0 files changed, 0 insertions, 0 deletions