Skip to content

Poor recovery from new network

A simple test case is to have a wifi that doesn't work, then connect. Restarting ntpd while the Ethernet is unplugged should work too.

ntpq -p from a while after turning WiFi on:

     remote           refid      st t when poll reach   delay   offset   jitter
==============================================================================
 fed            192.168.1.33     2 u    1 1024    1  15.1166 -1725.03   0.0000
 2.fedora.pool. .POOL.          16 p    - 1024    0   0.0000   0.0000   0.0038

This system was off air for a long time so the polling for both a server with local DNS (/etc/hosts) and a pool that needed external DNS had ramped up to 1024.

Bug 1: Looks like the server got poked when the net came up, but the polling didn't get reset. It did recover eventually. I don't have enough logging on that system to check the fine print.

Bug 2: The DNS didn't get poked.

Bug 3: Looks like the 1024 is a lie too. It hasn't recovered yet and I've waited much longer than 1024 seconds. Nothing in the log file.

There is a second poll variable in the peer struct: hpoll. DNS uses it and ramps up to 4096 seconds.