When will sysntpd sync time?

when will sysntpd sync time?
when with CPE, sometime it does not get the new date.

killall tcpdump; \
tcpdump -eni any udp port 123 & \
/etc/init.d/sysntpd restart
        procd_add_reload_trigger "system"
        procd_add_validation validate_ntp_section

is there another way?
what does it mean that procd_add_reload_trigger "system"


It should do so automatically, but since ntpd was put in a ujail (commit 2d34355e16b442fcf51e93786401716dae3c4ea2), it will not work on first boot due to a race condition if you are using an external DNS resolver for the host in question (i.e., no in /etc/resolv.conf).

... with the main bug dealing with /etc/resolv.conf race conditions being ...


Start ntpd directly, without jail


# mv /etc/capabilities/ntpd.json /etc/capabilities/ntpd.json-disabled
# service sysntpd restart

Root cause

procd and jail on routers without dnsmasq

#10843 - Time is not synced on (re)boot automatically after a sysupgrade to 22.03.0
#10389 - ujail: changes to resolv.conf may not be reflected in jail

In the detail

Time synchronization among active network devices is essential and critical.
Example: network with multiple Dumb APs

# echo "Diagnostics commands"
# tcpdump -v -n port 123
# grep resolv /proc/`ps | grep '/usr/sbin/ntpd' | grep -v grep | awk '{ print $1 }'`/mountinfo

Unsuccessful workarounds

/etc/init.d/sysntpd		# USE_PROCD variable is not evaluated

Package ntpd is too big to fit into memory (openssl on 8MiB AP with wolfssl)

Package ntpclient

  • does not regularly check ntp server
  • uses NTPv3 (sysntpd NTPv4)


1 Like