DHCP option 42 counts (NetOrk/netork#2380, decided 2026-11-11): a router that gets the site's time giver from its lease is aligned, so the driver stops switching DHCP NTP off.
configure_time_sync no longer sets use_dhcp=0; the option stays as the router has it. The "already has these servers" check no longer rewrites a router only because use_dhcp is on.
get_time_sync() reports dhcp_ntp_servers: what /etc/init.d/sysntpd adds to ntpd's list while use_dhcp is on -- each interface's data.ntpserver in ubus call network.interface dump (netifd's /lib/netifd/dhcp.script stores udhcpc's ntpsrv there; sysntpd's get_dhcp_ntp_servers reads exactly that), only the dhcp_interface list's where it names any, in netifd's order, each once. Read in the same round trip as uci -q show system; the exit code stays uci's. [] while use_dhcp or the client is off; None where netifd gives no answer.
TDD: the new tests (lease servers read apart, dhcp_interface, use_dhcp/disabled client, no or broken netifd answer, write keeps use_dhcp, no rewrite with DHCP on) written first and seen red.
napalm-standard check: meets the standard; ratchet: within the baseline.
## Summary
DHCP option 42 counts (NetOrk/netork#2380, decided 2026-11-11): a router that gets the site's time giver from its lease is aligned, so the driver stops switching DHCP NTP off.
- `configure_time_sync` no longer sets `use_dhcp=0`; the option stays as the router has it. The "already has these servers" check no longer rewrites a router only because `use_dhcp` is on.
- `get_time_sync()` reports `dhcp_ntp_servers`: what `/etc/init.d/sysntpd` adds to ntpd's list while `use_dhcp` is on -- each interface's `data.ntpserver` in `ubus call network.interface dump` (netifd's `/lib/netifd/dhcp.script` stores udhcpc's `ntpsrv` there; sysntpd's `get_dhcp_ntp_servers` reads exactly that), only the `dhcp_interface` list's where it names any, in netifd's order, each once. Read in the same round trip as `uci -q show system`; the exit code stays uci's. `[]` while `use_dhcp` or the client is off; None where netifd gives no answer.
- Floor `napalm_device_types>=4.36.0` (`TimeSyncDict.dhcp_ntp_servers`, NAPALM/napalm-device-types#105).
A router the first time sync commit (#36) already wrote keeps `use_dhcp=0` until it is set back -- the driver leaves the option alone, as decided.
## Related Issue
Part of NetOrk/netork#2380 (epic NetOrk/netork#2360). Depends on NAPALM/napalm-device-types#105: **CI fails until napalm-device-types 4.36.0 is released** -- expected.
## Testing
TDD: the new tests (lease servers read apart, `dhcp_interface`, `use_dhcp`/disabled client, no or broken netifd answer, write keeps `use_dhcp`, no rewrite with DHCP on) written first and seen red.
Against napalm-device-types from the #105 branch:
- `pytest -q --cov`: 339 passed; `time_sync_mixin.py` 100%.
- `ruff format --check`, `ruff check`: clean. `mypy` (napalm-device-types installed non-editable): clean.
- `napalm-standard check`: meets the standard; `ratchet`: within the baseline.
DHCP option 42 counts (NetOrk/netork#2380): a router that gets the
site's time giver from its lease is aligned. The first time sync commit
set use_dhcp=0 on every write, which cut a router off from the giver its
DHCP server hands out.
A write now leaves use_dhcp as the router has it, and the "already has
these servers" check no longer rewrites a router only because use_dhcp
is on. get_time_sync() reads what sysntpd adds to ntpd's list while
use_dhcp is on -- each interface's data.ntpserver in ubus call
network.interface dump, which /lib/netifd/dhcp.script fills from
udhcpc's ntpsrv, only the dhcp_interface list's where it names any -- in
the same round trip as uci, into dhcp_ntp_servers: [] while use_dhcp or
the client is off, None where netifd gives no answer.
Needs napalm-device-types 4.36.0 (TimeSyncDict.dhcp_ntp_servers).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
DHCP option 42 counts (NetOrk/netork#2380, decided 2026-11-11): a router that gets the site's time giver from its lease is aligned, so the driver stops switching DHCP NTP off.
configure_time_syncno longer setsuse_dhcp=0; the option stays as the router has it. The "already has these servers" check no longer rewrites a router only becauseuse_dhcpis on.get_time_sync()reportsdhcp_ntp_servers: what/etc/init.d/sysntpdadds to ntpd's list whileuse_dhcpis on -- each interface'sdata.ntpserverinubus call network.interface dump(netifd's/lib/netifd/dhcp.scriptstores udhcpc'sntpsrvthere; sysntpd'sget_dhcp_ntp_serversreads exactly that), only thedhcp_interfacelist's where it names any, in netifd's order, each once. Read in the same round trip asuci -q show system; the exit code stays uci's.[]whileuse_dhcpor the client is off; None where netifd gives no answer.napalm_device_types>=4.36.0(TimeSyncDict.dhcp_ntp_servers, NAPALM/napalm-device-types#105).A router the first time sync commit (#36) already wrote keeps
use_dhcp=0until it is set back -- the driver leaves the option alone, as decided.Related Issue
Part of NetOrk/netork#2380 (epic NetOrk/netork#2360). Depends on NAPALM/napalm-device-types#105: CI fails until napalm-device-types 4.36.0 is released -- expected.
Testing
TDD: the new tests (lease servers read apart,
dhcp_interface,use_dhcp/disabled client, no or broken netifd answer, write keepsuse_dhcp, no rewrite with DHCP on) written first and seen red.Against napalm-device-types from the #105 branch:
pytest -q --cov: 339 passed;time_sync_mixin.py100%.ruff format --check,ruff check: clean.mypy(napalm-device-types installed non-editable): clean.napalm-standard check: meets the standard;ratchet: within the baseline.