The day my ping took countermeasures
Jul 11, 2023Marek Majkowski

Summary
This post details how the `ping` utility handles clock adjustments by examining its source code and debugging techniques. It explains the 'taking countermeasures' message, the use of `gettimeofday` and `SO_TIMESTAMP` for RTT measurement, and the challenges of debugging VDSO calls. The author demonstrates fault injection using `strace` to trigger the countermeasure message and discusses the implications of `ping` sockets and capabilities.
More from the DNS Infrastructure & Naming Conventions trail
- The keys to the Internet change on October 11, 2026. Are you ready?
- 1.1.1.1 now supports post-quantum DNSSEC, all 2,420 bytes of it
- How we saved 100 terabytes of memory by optimizing 1.1.1.1’s DNS cache
- BGP ORIGIN attribute manipulation and its impact on the Internet
- Cloudflare Internal DNS is now generally available